summaryrefslogtreecommitdiffstats
path: root/tests/011
diff options
context:
space:
mode:
Diffstat (limited to 'tests/011')
-rw-r--r--tests/011/patmatch.tl8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/011/patmatch.tl b/tests/011/patmatch.tl
index c9326eda..784588ad 100644
--- a/tests/011/patmatch.tl
+++ b/tests/011/patmatch.tl
@@ -147,3 +147,11 @@
(test (when-match @a..@b '1..2 (list a b)) (1 2))
(test (when-match (rcons @a @b) '(rcons 1 2) (list a b)) (1 2))
+
+(test (let ((h #H(() (a 1) (b 2))))
+ (when-match @[h x y] 'a (list x y)))
+ (a 1))
+
+(test (let ((h #H(() (a 1) (b 2))))
+ (when-match @[h x @(oddp y)] 'a (list x y)))
+ (a 1))