summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--tests/subst.test16
2 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e0906c..b0037f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-08-08 Miguel Sofer <msofer@users.sourceforge.net>
+
+ * tests/subst.test: added 5.8-10 as further tests for [Bug 495207]
+
2002-08-08 Don Porter <dgp@users.sourceforge.net>
* tests/README: Noted removal of defs.tcl.
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