diff options
Diffstat (limited to 'tests/011/patmatch.tl')
-rw-r--r-- | tests/011/patmatch.tl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/011/patmatch.tl b/tests/011/patmatch.tl index f8f6b03f..0068eabb 100644 --- a/tests/011/patmatch.tl +++ b/tests/011/patmatch.tl @@ -116,6 +116,14 @@ (test (when-match (@a @(as a @(or x @a))) '(#1=(1 2 #1# 3) #1#) :yes) :yes) +(test (when-match (@(with x 42 @a) @b @c) '(1 2 3) (list a b c x)) + (1 2 3 42)) + +(test (let ((o 3)) + (when-match (@(evenp x) @(with @(oddp y) o @z)) '(4 6) + (list x y z))) + (4 3 6)) + (defstruct node () left right) |