1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-21 02:27:10 +03:00
mal/fantom/tests/stepA_mal.mal
Joel Martin 18f0ec2150 Runtest should fail on bad test data. Fix interop tests.
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.
2019-01-28 10:27:41 -06:00

33 lines
471 B
Plaintext

;; Testing basic fantom interop
(fantom-eval "7")
;=>7
(fantom-eval "return 3 * 9")
;=>27
(fantom-eval "\"7\"")
;=>"7"
(fantom-eval "\"abcd\".upper")
;=>"ABCD"
(fantom-eval "[7,8,9]")
;=>(7 8 9)
(fantom-eval "[\"abc\": 789]")
;=>{"abc" 789}
(fantom-eval "echo(\"hello\")")
;/hello
;=>nil
(fantom-eval "[\"a\",\"b\",\"c\"].join(\" \") { \"X${it}Y\" }")
;=>"XaY XbY XcY"
(fantom-eval "[1,2,3].map { 1 + it }")
;=>(2 3 4)
(fantom-eval "Env.cur.runtime")
;=>"java"