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 | a72d68e9e3a6b256d269517e7814afc84564f6b6 (patch) | |
tree | 34e2e4778f03517ac25e06a227e9af6025f1e6c9 /tests/subst.test | |
parent | 16d302504c7db41e690e330b251cd9f34b99fde5 (diff) | |
download | tcl-a72d68e9e3a6b256d269517e7814afc84564f6b6.zip tcl-a72d68e9e3a6b256d269517e7814afc84564f6b6.tar.gz tcl-a72d68e9e3a6b256d269517e7814afc84564f6b6.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 |