aboutsummaryrefslogtreecommitdiffstats
path: root/match-test.csc
diff options
context:
space:
mode:
Diffstat (limited to 'match-test.csc')
-rw-r--r--match-test.csc12
1 files changed, 10 insertions, 2 deletions
diff --git a/match-test.csc b/match-test.csc
index 3fed862..2728e44 100644
--- a/match-test.csc
+++ b/match-test.csc
@@ -18,7 +18,7 @@
(1 1)
(2 2)
(3 3)
- (else 4))
+ (_ 4))
3)
(test-case
"match-list"
@@ -27,12 +27,20 @@
((1 2) 1)
((1 2 3) 2)
((1 2 3 4) 3)
- (else 4))
+ (_ 4))
2)
(test-case
"binding"
(match '(1 2 3)
((1 (! x) 3) x))
+ 2)
+ (test-case
+ "ignore"
+ (match '(1 2 3)
+ ((_ _ _ _) 0)
+ ((2 _ _) 1)
+ ((1 _ _) 2)
+ (_ 3))
2))))
(for-each
(lambda (tc)