mirror of
https://github.com/kanaka/mal.git
synced 2024-11-11 00:52:44 +03:00
18f0ec2150
The interop tests weren't updated when regex support was added to runtest for matching output data. This was causing a bunch of implementations to silently fail while testing interop. Fix runtest.py to fail on bad test data and fix 21 implementations with the old style output matches.
29 lines
520 B
Plaintext
29 lines
520 B
Plaintext
;; Testing basic Tcl interop
|
|
;;
|
|
;; Note that in Tcl "everything is a string", so we don't have enough
|
|
;; information to convert the results to other Mal types.
|
|
|
|
(tcl* "expr {3 ** 4}")
|
|
;=>"81"
|
|
|
|
(tcl* "llength {a b c d}")
|
|
;=>"4"
|
|
|
|
(tcl* "concat {a b} c {d e} f g")
|
|
;=>"a b c d e f g"
|
|
|
|
(tcl* "puts \"hello [expr {5 + 6}] world\"")
|
|
;/hello 11 world
|
|
;=>""
|
|
|
|
(tcl* "set ::foo 8")
|
|
(tcl* "expr {$::foo}")
|
|
;=>"8"
|
|
|
|
(tcl* "proc mult3 {x} { expr {$x * 3} }")
|
|
(tcl* "mult3 6")
|
|
;=>"18"
|
|
|
|
(tcl* "string range $::tcl_version 0 1")
|
|
;=>"8."
|