diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-06-03 18:48:10 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-06-03 19:58:38 +1000 |
commit | 1eb1f3ed707923e0c95107d5c8bea9b37aeb2b8d (patch) | |
tree | 0bf058fc707970efaaee7f3fdb0f9ef88e2e0f3b /tests | |
parent | b36409168f3bdef1ecfbeb0288ba304db0aca64f (diff) | |
download | jimtcl-1eb1f3ed707923e0c95107d5c8bea9b37aeb2b8d.zip jimtcl-1eb1f3ed707923e0c95107d5c8bea9b37aeb2b8d.tar.gz jimtcl-1eb1f3ed707923e0c95107d5c8bea9b37aeb2b8d.tar.bz2 |
Fix parsing bug introduced by 505ce9d7
This caused a problem with quotes inside commands.
Rework the parsing to properly handle commands inside
quoted strings and quoted strings inside commands.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/parse.test | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/parse.test b/tests/parse.test index d8e6035..b28f285 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -272,38 +272,43 @@ test parse-1.53 "special chars in dict sugar" { array names a } {{x[}} -test parse-1.52 "special chars in dict sugar" { +test parse-1.54 "special chars in dict sugar" { set x $a(x\[) } 5 -test parse-1.53 "special chars in dict sugar" { +test parse-1.55 "special chars in dict sugar" { unset -nocomplain a set a(x\() 5 array names a } {x(} -test parse-1.52 "special chars in dict sugar" { +test parse-1.56 "special chars in dict sugar" { set x $a(x\() } 5 -test parse-1.53 "special chars in dict sugar" { +test parse-1.57 "special chars in dict sugar" { unset -nocomplain a set a(x() 5 array names a } {x(} -test parse-1.52 "special chars in dict sugar" { +test parse-1.58 "special chars in dict sugar" { set x $a(x() } 5 -test parse-1.53 "special chars in dict sugar" { +test parse-1.59 "special chars in dict sugar" { unset -nocomplain a set a(x") 5 lindex [array names a] 0 } {x"} -test parse-1.52 "special chars in dict sugar" { +test parse-1.60 "special chars in dict sugar" { set x $a(x") } 5 +test parse-1.61 "quote in command" { + set x [list \\" x] + lindex $x end +} x + testreport |