Perl: add step9_interop test
authorJoel Martin <github@martintribe.org>
Thu, 24 Apr 2014 01:30:33 +0000 (20:30 -0500)
committerJoel Martin <github@martintribe.org>
Thu, 24 Apr 2014 01:30:33 +0000 (20:30 -0500)
perl/tests/step9_interop.mal [new file with mode: 0644]

diff --git a/perl/tests/step9_interop.mal b/perl/tests/step9_interop.mal
new file mode 100644 (file)
index 0000000..1335be4
--- /dev/null
@@ -0,0 +1,22 @@
+;; Testing types returned from pl*
+
+(pl* "123")
+;=>123
+
+(pl* "\"abc\"")
+;=>"abc"
+
+(pl* "{'abc'=>123}")
+;=>{"abc" 123}
+
+(pl* "['abc', 123]")
+;=>("abc" 123)
+
+(pl* "2+3")
+;=>5
+
+;; Testing eval of print statement
+
+(pl* "print 'hello\n';")
+; hello
+;=>1