summaryrefslogtreecommitdiffstats
path: root/tests/while.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-09-19 18:17:54 (GMT)
committerhobbs <hobbs>2001-09-19 18:17:54 (GMT)
commit93f8aa9a4503e99c92cc046261e09d99e638c188 (patch)
treebd67a555349bc2a086720174d0243daff86a7c77 /tests/while.test
parenteaecbc2b998c46334ae14212a09eadfce713b4ab (diff)
downloadtcl-93f8aa9a4503e99c92cc046261e09d99e638c188.zip
tcl-93f8aa9a4503e99c92cc046261e09d99e638c188.tar.gz
tcl-93f8aa9a4503e99c92cc046261e09d99e638c188.tar.bz2
* generic/tclCompCmds.c (TclCompileStringCmd): INST_STR_MATCH -
Updated to Int1 instruction type and added special case to use INST_STR_EQ instead when no glob chars are specified in a static string. * tests/{for.test,foreach.test,if.test,while.test}: * generic/tclCompCmds.c (TclCompileForCmd, TclCompileForeachCmd, TclCompileIfCmd, TclCompileWhileCmd): Corrected the overaggressive compiling of loop bodies enclosed in ""s. [Bug #219166] (msofer)
Diffstat (limited to 'tests/while.test')
-rw-r--r--tests/while.test15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/while.test b/tests/while.test
index f34bf64..b10afdc 100644
--- a/tests/while.test
+++ b/tests/while.test
@@ -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: while.test,v 1.6 2000/04/10 17:19:06 ericm Exp $
+# RCS: @(#) $Id: while.test,v 1.7 2001/09/19 18:17:54 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -609,13 +609,20 @@ test while-6.5 {continue tests, long command body with computed command names} {
# Test for incorrect "double evaluation" semantics
-test while-7.1 {delayed substitution of body} {knownBug} {
+test while-7.1 {delayed substitution of body} {
set i 0
while {[incr i] < 10} "
set result $i
"
- set result
-} {0}
+ proc p {} {
+ set i 0
+ while {[incr i] < 10} "
+ set result $i
+ "
+ set result
+ }
+ append result [p]
+} {00}
# cleanup
::tcltest::cleanupTests