summaryrefslogtreecommitdiffstats
path: root/tests/011
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-04-25 13:48:26 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-04-25 13:48:26 -0700
commitf28ccd1afb2a87c7ac8dfef2f43397bff5d1df97 (patch)
treeac4fcd5be5b24775facc41700261c0d484c0e674 /tests/011
parenta96d1e927faba7300a3bc4108ff93af97707c947 (diff)
downloadtxr-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.tl9
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