diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-11-07 23:36:43 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-11-07 23:36:43 +0100 |
commit | 7c7c335386134bc1e45cf62fc2755173facc40cc (patch) | |
tree | ba70384701e9c63bbbe7ada638eb7a2b1f056e94 /tests | |
parent | f7c45171f5ef9a82612e8166184559b8ab781c4f (diff) | |
download | mew-7c7c335386134bc1e45cf62fc2755173facc40cc.tar.gz mew-7c7c335386134bc1e45cf62fc2755173facc40cc.tar.xz mew-7c7c335386134bc1e45cf62fc2755173facc40cc.zip |
add fail
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.mew | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/test.mew b/tests/test.mew index 903620c..98ad5fa 100644 --- a/tests/test.mew +++ b/tests/test.mew @@ -1,6 +1,7 @@ (import mew test - (chicken port)) + (chicken port) + (chicken condition)) (test-group "negate" (test #t ((negate not) #t)) @@ -477,4 +478,17 @@ (test 3 ((proj 2) 1 2 3)) (test-error ((proj 4) 1 2 3))) +(test-group "fail" + (test #t (condition-case (fail "foo") + ((exn) #t) + (() #f))) + (test #t (condition-case (fail '(florp) "foo") + ((florp) #t) + (() #f))) + (test #t (condition-case (fail '(florp flurp) "foo") + ((florp flurp) #t) + (() #f))) + (test "foo 1 2" (condition-case (fail "foo ~a ~a" 1 2) + (e (exn) (get-condition-property e 'exn 'message))))) + (test-exit) |