aboutsummaryrefslogtreecommitdiff
path: root/coffee/tests
diff options
context:
space:
mode:
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)