summaryrefslogtreecommitdiffstats
path: root/tests/regexp.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-30 07:11:18 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-30 07:11:18 (GMT)
commit1f1f43fcd2bfa68c8bff1a9d6dbb8ecab4be43e7 (patch)
tree35749cc38881de41be58b2c55c3e82de9cdc342c /tests/regexp.test
parentc8617b374b29d14c8be0900f1623ca3120468b62 (diff)
downloadtcl-1f1f43fcd2bfa68c8bff1a9d6dbb8ecab4be43e7.zip
tcl-1f1f43fcd2bfa68c8bff1a9d6dbb8ecab4be43e7.tar.gz
tcl-1f1f43fcd2bfa68c8bff1a9d6dbb8ecab4be43e7.tar.bz2
Thanks to TIP #587, convert many escapes in the testcases into the actual (UTF-8) character.
Diffstat (limited to 'tests/regexp.test')
-rw-r--r--tests/regexp.test14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index 842789e..e788b7f 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -54,8 +54,8 @@ test regexp-1.6 {basic regexp operation} {
} {0 1}
test regexp-1.7 {regexp utf compliance} {
# if not UTF-8 aware, result is "0 1"
- set foo "\u4e4eb q"
- regexp "\u4e4eb q" "a\u4e4eb qw\u5e4e\x4e wq" bar
+ set foo "乎b q"
+ regexp "乎b q" "a乎b qw幎N wq" bar
list [string compare $foo $bar] [regexp 4 $bar]
} {0 0}
test regexp-1.8 {regexp ***= metasyntax} {
@@ -194,14 +194,14 @@ test regexp-3.7 {getting substrings back from regexp} {
} {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"
+ "grüß-привет"
} {{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"] \
+ "grüß-привет"] \
[regexp -inline -indices -start 4 {(\w+)-(\w+)} \
- "gr\u00FC\u00DF-\u043F\u0440\u0438\u0432\u0435\u0442"]
+ "grüß-привет"]
} {{{3 10} {3 3} {5 10}} {}}
test regexp-4.1 {-nocase option to regexp} {
@@ -352,8 +352,8 @@ test regexp-7.16 {basic regsub operation} {
} {0 {}}
test regexp-7.17 {regsub utf compliance} {
# if not UTF-8 aware, result is "0 1"
- set foo "xyz555ijka\u4e4ebpqr"
- regsub a\u4e4eb xyza\u4e4ebijka\u4e4ebpqr 555 bar
+ set foo "xyz555ijka乎bpqr"
+ regsub a乎b xyza乎bijka乎bpqr 555 bar
list [string compare $foo $bar] [regexp 4 $bar]
} {0 0}
test regexp-7.18 {basic regsub replacement} {