summaryrefslogtreecommitdiffstats
path: root/tests/regexp.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-29 22:03:41 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-29 22:03:41 (GMT)
commit6ecf15e4f182a6be8c106737c7ee792beeab649a (patch)
tree0d66894a0f881a6bef9214f0a259d8e2daeb889c /tests/regexp.test
parent18dfd2c4666607dc76ff1b647f114b5f7947312f (diff)
parent213447740b2103263aec6b22da904e038cb915e9 (diff)
downloadtcl-6ecf15e4f182a6be8c106737c7ee792beeab649a.zip
tcl-6ecf15e4f182a6be8c106737c7ee792beeab649a.tar.gz
tcl-6ecf15e4f182a6be8c106737c7ee792beeab649a.tar.bz2
Merge 8.6
Diffstat (limited to 'tests/regexp.test')
-rw-r--r--tests/regexp.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index bae1217..ee92a35 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -192,6 +192,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