aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-22 23:50:43 -0500
committerJoel Martin <github@martintribe.org>2014-04-22 23:50:43 -0500
commit16354bb46100a752fbe2cc8788c0d3b5e9909eb3 (patch)
tree2afcef4b4d1352b2cf2696e62b14608ca8049513 /tests
parenta1150c535cdcca2a6206c0e1bece5b3d4293dbf7 (diff)
downloadmal-16354bb46100a752fbe2cc8788c0d3b5e9909eb3.tar.gz
mal-16354bb46100a752fbe2cc8788c0d3b5e9909eb3.zip
Perl: add stepA_more.
Diffstat (limited to 'tests')
-rw-r--r--tests/stepA_more.mal15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/stepA_more.mal b/tests/stepA_more.mal
index 2ca58fb..4d2acf9 100644
--- a/tests/stepA_more.mal
+++ b/tests/stepA_more.mal
@@ -1,14 +1,17 @@
;;
;; Testing try*/catch*
-(try* (abc 1 2) (catch* exc (prn exc))))
-; "'abc' not found"
+(try* (abc 1 2) (catch* exc (prn "exc is:" exc))))
+; "exc is:" "'abc' not found"
;=>nil
-;;;TODO: fix so long lines don't trigger ANSI escape codes
-;;;(try* (throw {"data" "foo"}) (catch* exc (do (prn "exc is:" exc) 7)))
-;;;; "exc is:" {"data" "foo"}
-;;;;=>7
+;;;TODO: fix so long lines don't trigger ANSI escape codes ;;;(try*
+(throw {"data" "foo"}) (catch* exc (do (prn "exc is:" exc) 7))) ;;;;
+"exc is:" {"data" "foo"} ;;;;=>7
+
+(try* (throw {"data" "foo"}) (catch* exc (do (prn "err:" exc) 7)))
+; "err:" {"data" "foo"}
+;=>7
(try* (throw "my exception") (catch* exc (do (prn "exc:" exc) 7)))
; "exc:" "my exception"