summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-04-26 07:20:49 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-04-26 07:20:49 -0700
commit538323f3a21632f1b8a6443ed79e2305306cee7b (patch)
tree5dec289d6d8ea0799a3a9ecabc2839c9c6b74061 /tests
parent59a96304bd8716eb68c672ab6970111565e3f269 (diff)
downloadtxr-538323f3a21632f1b8a6443ed79e2305306cee7b.tar.gz
txr-538323f3a21632f1b8a6443ed79e2305306cee7b.tar.bz2
txr-538323f3a21632f1b8a6443ed79e2305306cee7b.zip
matcher: bugfix in `text{rest}` case.
* share/txr/stdlib/match.tl (expand-quasi-match): Calculate npos correctly relative to current pos. Use match-str rather than starts-with.
Diffstat (limited to 'tests')
-rw-r--r--tests/011/patmatch.tl3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/011/patmatch.tl b/tests/011/patmatch.tl
index 38df4c62..063e574b 100644
--- a/tests/011/patmatch.tl
+++ b/tests/011/patmatch.tl
@@ -376,6 +376,9 @@
(test (when-match `@x@x` "123123" t) t)
(test (when-match `@x@{x [1..:]}` "12323" t) t))
+(let ((a "$"))
+ (test (when-match `@a-@b` "$-@" b) "@"))
+
(compile-only
(eval-only
(compile-file (base-name *load-path*) "temp.tlo")