summaryrefslogtreecommitdiffstats
path: root/tests/reg.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-09-21 19:04:40 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-09-21 19:04:40 (GMT)
commitd9db840088cdabd2863a7bd92ca051cda3f56c46 (patch)
tree0a529f6ed9e006d0521d481343a52d9f8f2818bd /tests/reg.test
parent42b210de3d1f3c3e38df2ee20bba91a796324108 (diff)
downloadtcl-d9db840088cdabd2863a7bd92ca051cda3f56c46.zip
tcl-d9db840088cdabd2863a7bd92ca051cda3f56c46.tar.gz
tcl-d9db840088cdabd2863a7bd92ca051cda3f56c46.tar.bz2
[1115587][0e0e150e49] Major fix for regexp handling of quantified backrefs.
Contributed by Tom Lane from the Postgres project.
Diffstat (limited to 'tests/reg.test')
-rw-r--r--tests/reg.test10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/reg.test b/tests/reg.test
index e6ce42c..647bba8 100644
--- a/tests/reg.test
+++ b/tests/reg.test
@@ -669,7 +669,13 @@ expectError 14.19 - {a(b)c\2} ESUBREG
expectMatch 14.20 bR {a\(b*\)c\1} abbcbb abbcbb bb
expectMatch 14.21 RP {^([bc])\1*$} bbb bbb b
expectMatch 14.22 RP {^([bc])\1*$} ccc ccc c
-knownBug expectNomatch 14.23 R {^([bc])\1*$} bcb
+expectNomatch 14.23 RP {^([bc])\1*$} bcb
+expectMatch 14.24 LRP {^(\w+)( \1)+$} {abc abc abc} {abc abc abc} abc { abc}
+expectNomatch 14.25 LRP {^(\w+)( \1)+$} {abc abd abc}
+expectNomatch 14.26 LRP {^(\w+)( \1)+$} {abc abc abd}
+expectMatch 14.27 RP {^(.+)( \1)+$} {abc abc abc} {abc abc abc} abc { abc}
+expectNomatch 14.28 RP {^(.+)( \1)+$} {abc abd abc}
+expectNomatch 14.29 RP {^(.+)( \1)+$} {abc abc abd}
doing 15 "octal escapes vs back references"
@@ -796,6 +802,7 @@ expectMatch 21.31 LP "\\y(\\w+)\\y" "-- abc-" "abc" "abc"
expectMatch 21.32 - a((b|c)d+)+ abacdbd acdbd bd b
expectMatch 21.33 N (.*).* abc abc abc
expectMatch 21.34 N (a*)* bc "" ""
+expectMatch 21.35 M { TO (([a-z0-9._]+|"([^"]+|"")+")+)} {asd TO foo} { TO foo} foo o {}
doing 22 "multicharacter collating elements"
@@ -848,6 +855,7 @@ expectMatch 24.9 - 3z* 123zzzz456 3zzzz
expectMatch 24.10 PT 3z*? 123zzzz456 3
expectMatch 24.11 - z*4 123zzzz456 zzzz4
expectMatch 24.12 PT z*?4 123zzzz456 zzzz4
+expectMatch 24.13 PT {^([^/]+?)(?:/([^/]+?))(?:/([^/]+?))?$} {foo/bar/baz} {foo/bar/baz} {foo} {bar} {baz}
doing 25 "mixed quantifiers"