aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/step1_read_print.mal11
-rw-r--r--tests/step2_eval.mal3
2 files changed, 11 insertions, 3 deletions
diff --git a/tests/step1_read_print.mal b/tests/step1_read_print.mal
index f0d7a9a..de7fcc1 100644
--- a/tests/step1_read_print.mal
+++ b/tests/step1_read_print.mal
@@ -60,7 +60,6 @@ abc-def
( + 1 (+ 2 3 ) )
;=>(+ 1 (+ 2 3))
-
;; Testing read of vectors
[+ 1 2]
;=>[+ 1 2]
@@ -71,7 +70,6 @@ abc-def
[ + 1 [+ 2 3 ] ]
;=>[+ 1 [+ 2 3]]
-
;; Testing read of hash maps
{"abc" 1}
;=>{"abc" 1}
@@ -109,4 +107,11 @@ abc-def
@a
;=>(deref a)
-
+;;
+;; Testing reader errors
+(1 2
+; expected ')', got EOF
+[1 2
+; expected ']', got EOF
+"abc
+; expected '"', got EOF
diff --git a/tests/step2_eval.mal b/tests/step2_eval.mal
index 33c7b17..b24af93 100644
--- a/tests/step2_eval.mal
+++ b/tests/step2_eval.mal
@@ -11,6 +11,9 @@
(/ (- (+ 5 (* 2 3)) 3) 4)
;=>2
+(abc 1 2 3)
+; .*\'abc\' not found.*
+
;; Testing evaluation within collection literals
[1 2 (+ 1 2)]
;=>[1 2 3]