summaryrefslogtreecommitdiffstats
path: root/tests/regexp.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/regexp.test')
-rw-r--r--tests/regexp.test17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index 842789e..6bed21e 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -19,6 +19,7 @@ if {"::tcltest" ni [namespace children]} {
unset -nocomplain foo
testConstraint exec [llength [info commands exec]]
+testConstraint nodep [info exists tcl_precision]
# Used for constraining memory leak tests
testConstraint memory [llength [info commands memory]]
@@ -54,8 +55,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 +195,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 +353,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} {
@@ -765,7 +766,7 @@ test regexp-19.2 {regsub null replacement} {
string equal $result $expected
} 1
-test regexp-20.1 {regsub shared object shimmering} -body {
+test regexp-20.1 {regsub shared object shimmering} -constraints nodep -body {
# Bug #461322
set a abcdefghijklmnopqurstuvwxyz
set b $a