# BRINTOS-19 Tcl-on-musl self-test. Reaching ALL-TCL-OK proves Tcl_Init loaded # init.tcl (else tclsh aborts "can't find init.tcl" before this runs). puts "R2-expr [expr 6*7]" proc fib {n} {expr {$n<2 ? $n : [fib [expr {$n-1}]]+[fib [expr {$n-2}]]}} puts "R2-fib15 [fib 15]" puts "R2-string [string toupper abc]/[string length hello]" puts "R2-list [lsort -integer {3 1 2 10}]" set s "café-中" puts "R3-utf8 [expr {[encoding convertfrom utf-8 [encoding convertto utf-8 $s]] eq $s}]" puts "R1-encN [llength [encoding names]]" puts "R4-exists [file exists /usr/lib/tcl8.6/init.tcl]/[file readable /usr/lib/tcl8.6/init.tcl]" puts "R4-pwd [pwd]" puts "ALL-TCL-OK"