diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-04-25 13:48:26 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-04-25 13:48:26 -0700 |
commit | f28ccd1afb2a87c7ac8dfef2f43397bff5d1df97 (patch) | |
tree | ac4fcd5be5b24775facc41700261c0d484c0e674 /tests/011 | |
parent | a96d1e927faba7300a3bc4108ff93af97707c947 (diff) | |
download | txr-f28ccd1afb2a87c7ac8dfef2f43397bff5d1df97.tar.gz txr-f28ccd1afb2a87c7ac8dfef2f43397bff5d1df97.tar.bz2 txr-f28ccd1afb2a87c7ac8dfef2f43397bff5d1df97.zip |
matcher: more quasi tests: coverage of all cases.
* tests/011/patmatch.tl: More tests. All explicitly coded
cases covered, except the fall-through situations we are
not yet catching in expand-quasi-match.
Diffstat (limited to 'tests/011')
-rw-r--r-- | tests/011/patmatch.tl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/011/patmatch.tl b/tests/011/patmatch.tl index e9685b87..38df4c62 100644 --- a/tests/011/patmatch.tl +++ b/tests/011/patmatch.tl @@ -367,7 +367,14 @@ (test (when-match `@a@b` "abcd" a) "a") (test (when-match `@a@{b [1..:]}` "acd" a) "a") (test (when-match `@a@{b [1..:]}` "abcd" a) "ab") - (test (when-match `@a@{b [0..1]}` "abcd" a) nil)) + (test (when-match `@a@{b [0..1]}` "abcd" a) nil) + (test (when-match `@a@{b [0..2]}d` "abcd" a) "a")) + +(let ((x 123)) + (test (when-match `^@{x 5}$` "^123 $" t) t) + (test (when-match `^@{x -5}$` "^ 123$" t) t) + (test (when-match `@x@x` "123123" t) t) + (test (when-match `@x@{x [1..:]}` "12323" t) t)) (compile-only (eval-only |