aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-06-27 22:11:31 +1000
committerSteve Bennett <steveb@workware.net.au>2011-07-08 05:41:58 +1000
commitbd5bdcbe8a88570d1ac23511443563bc4454504d (patch)
tree1a05543fd69275f1371f3f4c3649ee284bc1071a /tests
parent4a5e4965e2c208375a77d40b831a07897f80ee50 (diff)
downloadjimtcl-bd5bdcbe8a88570d1ac23511443563bc4454504d.zip
jimtcl-bd5bdcbe8a88570d1ac23511443563bc4454504d.tar.gz
jimtcl-bd5bdcbe8a88570d1ac23511443563bc4454504d.tar.bz2
Make list to string conversion more Tcl compatible
If a list elements contains unmatch ] brackets, use backslash quoting instead of braces. This is what Tcl does. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/scan.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/scan.test b/tests/scan.test
index f936ee3..8bfcbe8 100644
--- a/tests/scan.test
+++ b/tests/scan.test
@@ -20,9 +20,9 @@ needs cmd scan
test scan-1.1 {BuildCharSet, CharInSet} {
list [scan foo {%[^o]} x] $x
} {1 f}
-test scan-1.2 {BuildCharSet, CharInSet} jim {
+test scan-1.2 {BuildCharSet, CharInSet} {
list [scan \]foo {%[]f]} x] $x
-} {1 {]f}}
+} {1 \]f}
test scan-1.3 {BuildCharSet, CharInSet} {
list [scan abc-def {%[a-c]} x] $x
} {1 abc}