diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-02-08 07:19:16 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-02-08 07:19:16 -0800 |
commit | 8db7c191d73cd727910f9d656881db9248dfdfad (patch) | |
tree | 1c44e5fed899cdd514ad09894ab4f7f2078e32b8 /tests | |
parent | c8d581648431d6df4cc1db9e87a1ad1306aeddb8 (diff) | |
download | txr-8db7c191d73cd727910f9d656881db9248dfdfad.tar.gz txr-8db7c191d73cd727910f9d656881db9248dfdfad.tar.bz2 txr-8db7c191d73cd727910f9d656881db9248dfdfad.zip |
matcher: @(and) back-referencing test.
* tests/011/patmatch.tl: back-referencing between the
expressions in an @(and) patter has recently been introduced,
and needs some coverage.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/011/patmatch.tl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/011/patmatch.tl b/tests/011/patmatch.tl index f49b115d..36e30fb5 100644 --- a/tests/011/patmatch.tl +++ b/tests/011/patmatch.tl @@ -71,6 +71,9 @@ (list x y z)) (1 2 3)) +(test (if-match @(and (@x 1) (1 @x)) '(1 1) x) 1) +(test (if-match @(and (@x 1) (1 @x)) '(1 2) x) nil) + (test (when-match @(all @(or (@x @y) @z)) '((1 2) (3 4)) (list x y z)) ((1 3) (2 4) (nil nil))) |