diff options
Diffstat (limited to 'tests/011/patmatch.tl')
-rw-r--r-- | tests/011/patmatch.tl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/011/patmatch.tl b/tests/011/patmatch.tl index 9647c52b..c6b67614 100644 --- a/tests/011/patmatch.tl +++ b/tests/011/patmatch.tl @@ -513,6 +513,15 @@ (@else (error "unhandled case"))))) (:odd 1 :pair 2 3 :even 4 :pair 5 6)) +(mtest + (must-match (@a @b) '(1 2) (list a b)) (1 2) + (must-match (@a @b) '(1 2 3) (list a b)) :error) + +(mtest + (must-match-case 42) :error + (must-match-case 42 (@a a)) 42 + (must-match-case '(1 2) ((@a) a)) :error) + (compile-only (eval-only (compile-file (base-name *load-path*) "temp.tlo") |