aboutsummaryrefslogtreecommitdiffstats
path: root/csc/match-test.csc
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-07-22 12:00:46 -0700
committerRose Hogenson <rhogenson@posteo.net>2022-07-22 12:00:46 -0700
commit9f8ae9d1de7988299fccb9a6e2673bf147c6d9eb (patch)
tree3ea426b72ad1c9588a11396eebf735e86256acdd /csc/match-test.csc
parentPerform argument conversion. (diff)
downloadchromatopelma-9f8ae9d1de7988299fccb9a6e2673bf147c6d9eb.tar.zst
Fix a bug in matching record types.
Running the record matcher has a side-effect (raising *no-match*), so we call it ahead of time to ensure a consistent order of evaluation.
Diffstat (limited to 'csc/match-test.csc')
-rw-r--r--csc/match-test.csc8
1 files changed, 8 insertions, 0 deletions
diff --git a/csc/match-test.csc b/csc/match-test.csc
index d4da153..bcd0d35 100644
--- a/csc/match-test.csc
+++ b/csc/match-test.csc
@@ -101,3 +101,11 @@
2
(match (make-test-record-type 1 2 3)
((% %test-record-type a b c) b))))
+
+
+(test match-record-type-any
+ (assert-equal
+ #t
+ (match '(1 2 3)
+ ((% %test-record-type . _) #f)
+ ((! '(1 2 3)) #t))))