diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2018-11-06 10:04:02 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2018-11-06 10:04:02 (GMT) |
commit | 179e8f4df7568f6aca6e53525abfe0505fd2a578 (patch) | |
tree | c9328ec8e0afd8af8a96b9f3da12b152cec7c281 /tests/subst.test | |
parent | c5a85dbfdc7dce9328b7f5fffb0bae519f68cf9f (diff) | |
parent | 2798a075ee62ea5ab4aa80279d614a8634ba378a (diff) | |
download | tcl-179e8f4df7568f6aca6e53525abfe0505fd2a578.zip tcl-179e8f4df7568f6aca6e53525abfe0505fd2a578.tar.gz tcl-179e8f4df7568f6aca6e53525abfe0505fd2a578.tar.bz2 |
merge core-8-branch
Diffstat (limited to 'tests/subst.test')
-rw-r--r-- | tests/subst.test | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/subst.test b/tests/subst.test index 2115772..1f3c22a 100644 --- a/tests/subst.test +++ b/tests/subst.test @@ -91,29 +91,29 @@ test subst-5.4 {command substitutions} { } {1 {invalid command name "bogus_command"}} test subst-5.5 {command substitutions} { set a 0 - list [catch {subst {[set a 1}} msg] $a $msg + list [catch {subst {[set a 1}} msg] $a $msg } {1 0 {missing close-bracket}} test subst-5.6 {command substitutions} { set a 0 - list [catch {subst {0[set a 1}} msg] $a $msg + list [catch {subst {0[set a 1}} msg] $a $msg } {1 0 {missing close-bracket}} test subst-5.7 {command substitutions} { set a 0 - list [catch {subst {0[set a 1; set a 2}} msg] $a $msg + list [catch {subst {0[set a 1; set a 2}} msg] $a $msg } {1 1 {missing close-bracket}} # repeat the tests above simulating cmd line input test subst-5.8 {command substitutions} { set script {[subst {[set a 1}]} - list [catch {exec [info nameofexecutable] << $script} msg] $msg + list [catch {exec [info nameofexecutable] << $script} msg] $msg } {1 {missing close-bracket}} test subst-5.9 {command substitutions} { set script {[subst {0[set a 1}]} - list [catch {exec [info nameofexecutable] << $script} msg] $msg + list [catch {exec [info nameofexecutable] << $script} msg] $msg } {1 {missing close-bracket}} test subst-5.10 {command substitutions} { set script {[subst {0[set a 1; set a 2}]} - list [catch {exec [info nameofexecutable] << $script} msg] $msg + list [catch {exec [info nameofexecutable] << $script} msg] $msg } {1 {missing close-bracket}} test subst-6.1 {clear the result after command substitution} -body { @@ -166,7 +166,7 @@ test subst-8.6 {return in a subst} -returnCodes error -body { subst "foo \[return {x}; bogus code bar" } -result {missing close-bracket} test subst-8.7 {return in a subst, parse error} -body { - subst {foo [return {x} ; set a {}"" ; stuff] bar} + subst {foo [return {x} ; set a {}"" ; stuff] bar} } -returnCodes error -result {extra characters after close-brace} test subst-8.8 {return in a subst, parse error} -body { subst {foo [return {x} ; set bar baz ; set a {}"" ; stuff] bar} |