diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/subst.test | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/subst.test b/tests/subst.test index 179e086..0ff69f8 100644 --- a/tests/subst.test +++ b/tests/subst.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: subst.test,v 1.11 2002/04/05 19:26:35 dgp Exp $ +# RCS: @(#) $Id: subst.test,v 1.12 2002/08/08 15:28:55 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -95,6 +95,20 @@ test subst-5.7 {command substitutions} { 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 +} {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 +} {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 +} {1 {missing close-bracket}} + test subst-6.1 {clear the result after command substitution} { catch {unset a} list [catch {subst {[concat foo] $a}} msg] $msg |