lib/lisp/tests/error-tests.nydp in nydp-0.2.3 vs lib/lisp/tests/error-tests.nydp in nydp-0.2.5
- old
+ new
@@ -12,9 +12,20 @@
(on-err (= x "impossible")
(= x (nil nil nil)))
x)
"impossible")
+ ("handles nested errors"
+ (on-err (joinstr "\n" errors)
+ (on-err (error "foo")
+ (on-err (error "bar")
+ (on-err (error "toto")
+ (error "primum errorum")))))
+ "\"foo\"
+\"bar\"
+\"toto\"
+\"primum errorum\"")
+
("handles errors but any ensuring clause gets called first"
(with (x nil y nil)
(on-err (= x 'impossible)
(ensure (assign y 'ensure-clause)
(nil nil nil)))