diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2001-08-22 13:57:53 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2001-08-22 13:57:53 (GMT) |
commit | 21f82843c6c165accef050494b369d3aad569171 (patch) | |
tree | 9d8334283811df361a26e28cdb9a50c91269d53a /tests/compile.test | |
parent | cb124d657e0225923742eabc32f1815299a67d78 (diff) | |
download | tcl-21f82843c6c165accef050494b369d3aad569171.zip tcl-21f82843c6c165accef050494b369d3aad569171.tar.gz tcl-21f82843c6c165accef050494b369d3aad569171.tar.bz2 |
Fixed overagressive compilation of [catch], [Bug #219184]
Diffstat (limited to 'tests/compile.test')
-rw-r--r-- | tests/compile.test | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/compile.test b/tests/compile.test index 7a26031..2a8d6b8 100644 --- a/tests/compile.test +++ b/tests/compile.test @@ -1,4 +1,4 @@ -# This file contains tests for the file tclCompile.c. +# This file contains tests for the files tclCompile.c and tclCompCmds.c # # This file contains a collection of tests for one or more of the Tcl # built-in commands. Sourcing this file into Tcl runs the tests and @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: compile.test,v 1.9 2000/05/03 00:14:36 hobbs Exp $ +# RCS: @(#) $Id: compile.test,v 1.10 2001/08/22 13:57:53 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -89,6 +89,14 @@ test compile-3.2 {TclCompileCatchCmd: non-local variables} { catch-test set ::foo } 3 +test compile-3.3 {TclCompileCatchCmd: overagressive compiling [bug 219184]} { + proc catch-test {str} { + catch [eval $str GOOD] + error BAD + } + catch {catch-test error} ::foo + set ::foo +} {GOOD} test compile-4.1 {TclCompileForCmd: command substituted test expression} { set i 0 |