summaryrefslogtreecommitdiffstats
path: root/tests/011/patmatch.tl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/011/patmatch.tl')
-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