aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2019-10-27 20:46:56 +1000
committerSteve Bennett <steveb@workware.net.au>2019-10-27 20:46:56 +1000
commit38c389a29e8ff582ba32c7737bb90f0f0df12078 (patch)
tree3b23581f8e1465771aa45764a541a531e9f4c54b /tests
parent80fea1f6e6c5af588faa9159e165198a13983efe (diff)
downloadjimtcl-38c389a29e8ff582ba32c7737bb90f0f0df12078.zip
jimtcl-38c389a29e8ff582ba32c7737bb90f0f0df12078.tar.gz
jimtcl-38c389a29e8ff582ba32c7737bb90f0f0df12078.tar.bz2
regexp, regsub: -start is a character index
Not a byte index Reported-by: dbohdan <dbohdan@dbohdan.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/regexp2.test7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/regexp2.test b/tests/regexp2.test
index f7cf516..76735e6 100644
--- a/tests/regexp2.test
+++ b/tests/regexp2.test
@@ -627,7 +627,12 @@ test regexpComp-16.3 {regsub -start} {
# lappend out [regsub -start 0 -all {\A(\w)} {abcde} {/\1} x] $x
# lappend out [regsub -start 2 -all {\A(\w)} {abcde} {/\1} x] $x
#} {5 /a/b/c/d/e 3 ab/c/d/e}
-
+test regexpComp-16.5 {regexp -start with utf8} utf8 {
+ regexp -inline -start 1 . \u0442\u0435\u0441\u0442
+} \u0435
+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}