summaryrefslogtreecommitdiffstats
path: root/tests/011
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-01-27 20:56:30 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-01-27 20:56:30 -0800
commitbd59edc88776eb56fc5354d7546fbe4da98a841f (patch)
tree0bac9bd1e159d33cb81bfd658ef370bd02d86a50 /tests/011
parentb0adac41c9ed37fa2783cbbde7d243f5496ed954 (diff)
downloadtxr-bd59edc88776eb56fc5354d7546fbe4da98a841f.tar.gz
txr-bd59edc88776eb56fc5354d7546fbe4da98a841f.tar.bz2
txr-bd59edc88776eb56fc5354d7546fbe4da98a841f.zip
matcher: new broken test case: bad order of checks.
* tests/011/patmatch.tl: Even though bar mismatches foo, the second element @(all) is processed and tries to collect the list. This results in an error due to the list being improper.
Diffstat (limited to 'tests/011')
-rw-r--r--tests/011/patmatch.tl2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/011/patmatch.tl b/tests/011/patmatch.tl
index af86aaef..60b28b63 100644
--- a/tests/011/patmatch.tl
+++ b/tests/011/patmatch.tl
@@ -75,6 +75,8 @@
(test (when-match @(or @(all @x)) '(1 2 3) x) (1 2 3))
+(test (when-match (foo @(all @x)) '(bar (1 2 . 3)) x) nil)
+
(test (if-match @(or (@x 3 3) (1 @x 3) (1 2 @x)) '(1 2 3) x) 2)
(test (if-match @(op <= 10 @1 13) 11 :yes :no) :yes)
(test (when-match @(let x @(op <= 10 @1 13)) 11 x) 11)