diff options
| author | Miguel Sofer <miguel.sofer@gmail.com> | 2002-08-08 15:28:55 (GMT) |
|---|---|---|
| committer | Miguel Sofer <miguel.sofer@gmail.com> | 2002-08-08 15:28:55 (GMT) |
| commit | fbc26ed581028b47ad0bea54b8d992618c5c1cca (patch) | |
| tree | 34e2e4778f03517ac25e06a227e9af6025f1e6c9 /tests/subst.test | |
| parent | 4ed222ca76a14982888ff2f7f30f4d6496419ce8 (diff) | |
| download | tcl-fbc26ed581028b47ad0bea54b8d992618c5c1cca.zip tcl-fbc26ed581028b47ad0bea54b8d992618c5c1cca.tar.gz tcl-fbc26ed581028b47ad0bea54b8d992618c5c1cca.tar.bz2 | |
* tests/subst.test: added 5.8-10 as further tests for [Bug 495207]
Diffstat (limited to 'tests/subst.test')
| -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 |
