summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2020-08-28 18:19:11 (GMT)
committerkjnash <k.j.nash@usa.net>2020-08-28 18:19:11 (GMT)
commit643301e722f2bd341562a3cbc9ff406e88a1fd91 (patch)
tree90a7d2fa46001cbb796707ae52cc1be5f7744a24
parentdf56e0e1dfc8a3bb40ec6d30b6c36a37f043a374 (diff)
parent30c146de547598e2046e7470f79645a0e5c164a5 (diff)
downloadtcl-643301e722f2bd341562a3cbc9ff406e88a1fd91.zip
tcl-643301e722f2bd341562a3cbc9ff406e88a1fd91.tar.gz
tcl-643301e722f2bd341562a3cbc9ff406e88a1fd91.tar.bz2
Merge 8.6
-rw-r--r--tests/regexp.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index 9fff262..6be902b 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -178,6 +178,17 @@ test regexp-3.7 {getting substrings back from regexp} {
set foo 1; set f2 1; set f3 1; set f4 1
list [regexp -indices (a)(b)?(c) xacy foo f2 f3 f4] $foo $f2 $f3 $f4
} {1 {1 2} {1 1} {-1 -1} {2 2}}
+test regexp-3.8a {-indices by multi-byte utf-8} {
+ regexp -inline -indices {(\w+)-(\w+)} \
+ "gr\u00FC\u00DF-\u043F\u0440\u0438\u0432\u0435\u0442"
+} {{0 10} {0 3} {5 10}}
+test regexp-3.8b {-indices by multi-byte utf-8, from -start position} {
+ list\
+ [regexp -inline -indices -start 3 {(\w+)-(\w+)} \
+ "gr\u00FC\u00DF-\u043F\u0440\u0438\u0432\u0435\u0442"] \
+ [regexp -inline -indices -start 4 {(\w+)-(\w+)} \
+ "gr\u00FC\u00DF-\u043F\u0440\u0438\u0432\u0435\u0442"]
+} {{{3 10} {3 3} {5 10}} {}}
test regexp-4.1 {-nocase option to regexp} {
regexp -nocase foo abcFOo