diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-06-27 22:11:31 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-07-08 05:41:58 +1000 |
commit | bd5bdcbe8a88570d1ac23511443563bc4454504d (patch) | |
tree | 1a05543fd69275f1371f3f4c3649ee284bc1071a /tests/scan.test | |
parent | 4a5e4965e2c208375a77d40b831a07897f80ee50 (diff) | |
download | jimtcl-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/scan.test')
-rw-r--r-- | tests/scan.test | 4 |
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} |