aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perl/tests/step9_interop.mal22
1 files changed, 22 insertions, 0 deletions
diff --git a/perl/tests/step9_interop.mal b/perl/tests/step9_interop.mal
new file mode 100644
index 0000000..1335be4
--- /dev/null
+++ b/perl/tests/step9_interop.mal
@@ -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