summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhypnotoad <yoda@etoyoc.com>2018-02-13 19:22:31 (GMT)
committerhypnotoad <yoda@etoyoc.com>2018-02-13 19:22:31 (GMT)
commitc5a85dbfdc7dce9328b7f5fffb0bae519f68cf9f (patch)
treee0c7316c427f02d385d7bd82e39567b2182fde7c
parentd49ccd64f2f154eedcab6322a4b9c45f7e63716e (diff)
downloadtcl-c5a85dbfdc7dce9328b7f5fffb0bae519f68cf9f.zip
tcl-c5a85dbfdc7dce9328b7f5fffb0bae519f68cf9f.tar.gz
tcl-c5a85dbfdc7dce9328b7f5fffb0bae519f68cf9f.tar.bz2
Correcting the string tests
-rw-r--r--tests/string.test30
1 files changed, 23 insertions, 7 deletions
diff --git a/tests/string.test b/tests/string.test
index 51bf073..a4797fa 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -2001,8 +2001,12 @@ test string-29.4 {string cat, many args} {
test string-30.1 {string is dict} {
- string is dict {a b c}
+ string is dict {a b c d}
} 1
+test string-30.1a {string is dict} {
+ string is dict {a b c}
+} 0
+
test string-30.2 {string is dict} {
string is dict "a \{b c"
} 0
@@ -2013,8 +2017,12 @@ test string-30.4 {string is dict} {
string is dict {}
} 1
test string-30.5 {string is dict} {
- string is dict -strict {a b c}
+ string is dict -strict {a b c d}
} 1
+test string-30.5a {string is dict} {
+ string is dict -strict {a b c}
+} 0
+
test string-30.6 {string is dict} {
string is dict -strict "a \{b c"
} 0
@@ -2026,16 +2034,24 @@ test string-30.8 {string is dict} {
} 1
test string-30.9 {string is dict} {
set x {}
- list [string is dict -failindex x {a b c}] $x
+ list [string is dict -failindex x {a b c d}] $x
} {1 {}}
+test string-30.9a {string is dict} {
+ set x {}
+ list [string is dict -failindex x {a b c}] $x
+} {0 0}
test string-30.10 {string is dict} {
set x {}
+ list [string is dict -failindex x "a \{b c d"] $x
+} {0 0}
+test string-30.10a {string is dict} {
+ set x {}
list [string is dict -failindex x "a \{b c"] $x
-} {0 2}
+} {0 0}
test string-30.11 {string is dict} {
set x {}
list [string is dict -failindex x {a b {b c}d e}] $x
-} {0 4}
+} {0 0}
test string-30.12 {string is dict} {
set x {}
list [string is dict -failindex x {}] $x
@@ -2043,11 +2059,11 @@ test string-30.12 {string is dict} {
test string-30.13 {string is dict} {
set x {}
list [string is dict -failindex x { {b c}d e}] $x
-} {0 2}
+} {0 0}
test string-30.14 {string is dict} {
set x {}
list [string is dict -failindex x "\uabcd {b c}d e"] $x
-} {0 2}
+} {0 0}
test string-30.15 {string is dict, valid dict} {
string is dict {a b c d e f}
} 1