aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2019-10-27 21:17:42 +1000
committerSteve Bennett <steveb@workware.net.au>2019-10-27 21:17:42 +1000
commit9eba9e87fc3ed257bf82c1bc7e2f77dba1aaf9a5 (patch)
treea439f53d186ac7431935b91c4b52a8f7d38eb7dc /tests
parent38c389a29e8ff582ba32c7737bb90f0f0df12078 (diff)
downloadjimtcl-9eba9e87fc3ed257bf82c1bc7e2f77dba1aaf9a5.zip
jimtcl-9eba9e87fc3ed257bf82c1bc7e2f77dba1aaf9a5.tar.gz
jimtcl-9eba9e87fc3ed257bf82c1bc7e2f77dba1aaf9a5.tar.bz2
regexp -indices should return character indices
Not byte indices Reported-by: dbohdan <dbohdan@dbohdan.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/regexp2.test4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regexp2.test b/tests/regexp2.test
index 76735e6..1aee8cd 100644
--- a/tests/regexp2.test
+++ b/tests/regexp2.test
@@ -633,6 +633,7 @@ test regexpComp-16.5 {regexp -start with utf8} utf8 {
test regexpComp-16.6 {regexp -start with utf8} utf8 {
regsub -start 1 . \u0442\u0435\u0441\u0442 x
} \u0442x\u0441\u0442
+
test regexpComp-17.1 {regexp -inline} {
regexp -inline b ababa
} {b}
@@ -654,6 +655,9 @@ test regexpComp-17.6 {regexp -inline no matches} {
test regexpComp-17.7 {regexp -inline, no matchvars allowed} {
list [catch {regexp -inline b abc match} msg] $msg
} {1 {regexp match variables not allowed when using -inline}}
+test regexpComp-17.8 {regexp -indices utf8} utf8 {
+ regexp -all -inline -start 1 -indices . \u0442\u0435\u0441\u0442
+} {{1 1} {2 2} {3 3}}
test regexpComp-18.1 {regexp -all} {
regexp -all b bbbbb