aboutsummaryrefslogtreecommitdiff
path: root/coffee/tests
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-11-08 16:56:36 -0600
committerJoel Martin <github@martintribe.org>2015-01-09 16:16:45 -0600
commit891c3f3b478292ad0bfca44b0dc098a2aecc9a5d (patch)
treed30c7923ffee7699cfca94af84f3be297448fff2 /coffee/tests
parent9b3362e86a57ed7f14c5fd018c37713185e0c154 (diff)
downloadmal-891c3f3b478292ad0bfca44b0dc098a2aecc9a5d.tar.gz
mal-891c3f3b478292ad0bfca44b0dc098a2aecc9a5d.zip
CoffeeScript: add all steps. Self-hosting.
Diffstat (limited to 'coffee/tests')
-rw-r--r--coffee/tests/stepA_interop.mal24
1 files changed, 24 insertions, 0 deletions
diff --git a/coffee/tests/stepA_interop.mal b/coffee/tests/stepA_interop.mal
new file mode 100644
index 0000000..f785292
--- /dev/null
+++ b/coffee/tests/stepA_interop.mal
@@ -0,0 +1,24 @@
+;; Testing basic bash interop
+
+(js* "7")
+;=>7
+
+(js* "'7'")
+;=>"7"
+
+(js* "[7,8,9]")
+;=>(7 8 9)
+
+(js* "console.log('hello');")
+; hello
+;=>nil
+
+(js* "foo=8;")
+(js* "foo;")
+;=>8
+
+(js* "['a','b','c'].map(function(x){return 'X'+x+'Y'}).join(' ')")
+;=>"XaY XbY XcY"
+
+(js* "[1,2,3].map(function(x){return 1+x})")
+;=>(2 3 4)