summaryrefslogtreecommitdiffstats
path: root/tests/subst.test
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2004-09-30 10:41:07 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2004-09-30 10:41:07 (GMT)
commit36fd8cc0959204088d97c32156f269faaaca2402 (patch)
tree6f9ca8db90501c0f6f1fc3034a6b16213867c86a /tests/subst.test
parent4b24b8046191325fd397650146bb2b21fbcf7d84 (diff)
downloadtcl-36fd8cc0959204088d97c32156f269faaaca2402.zip
tcl-36fd8cc0959204088d97c32156f269faaaca2402.tar.gz
tcl-36fd8cc0959204088d97c32156f269faaaca2402.tar.bz2
* tests/subst.test (12.1-2): added tests for [Bug 1036649]
Diffstat (limited to 'tests/subst.test')
-rw-r--r--tests/subst.test17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/subst.test b/tests/subst.test
index 0d3147a..16de9c4 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.14 2003/03/13 02:48:54 dgp Exp $
+# RCS: @(#) $Id: subst.test,v 1.15 2004/09/30 10:41:07 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -220,6 +220,21 @@ test subst-11.6 {continue in a variable subst} {
subst {foo $var([continue]) bar}
} {foo bar}
+test subst-12.1 {nasty case, Bug 1036649} {
+ for {set i 0} {$i < 10} {incr i} {
+ set res [list [catch {subst "\[subst {};"} msg] $msg]
+ if {$msg ne "missing close-bracket"} break
+ }
+ set res
+} {1 {missing close-bracket}}
+test subst-12.2 {nasty case, Bug 1036649} {
+ for {set i 0} {$i < 10} {incr i} {
+ set res [list [catch {subst "\[subst {}; "} msg] $msg]
+ if {$msg ne "missing close-bracket"} break
+ }
+ set res
+} {1 {missing close-bracket}}
+
# cleanup
::tcltest::cleanupTests
return