X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=tcl%2Ftests%2Fwhile.test;h=68fdc97d66fac00ec58f636a22657a7a6dffa089;hb=c271fc2eb11c7c6a7e7da1341d5c14ae57ecf395;hp=d3ac4b167d6c42b384bfffe20d1dc87e68bfd2ea;hpb=16ed0b0a165e0ca566d9ec2ad071bc45f8a3f05c;p=pf3gnuchains%2Fpf3gnuchains3x.git diff --git a/tcl/tests/while.test b/tcl/tests/while.test index d3ac4b167d..68fdc97d66 100644 --- a/tcl/tests/while.test +++ b/tcl/tests/while.test @@ -30,7 +30,7 @@ test while-1.2 {TclCompileWhileCmd: error in test expression} { set i 0 catch {while {$i<} break} msg set errorInfo -} {syntax error in expression "$i<" +} {syntax error in expression "$i<": premature end of expression ("while" test expression) while compiling "while {$i<} break"} @@ -310,7 +310,7 @@ test while-4.3 {while (not compiled): error in test expression} { set z while catch {$z {$i<} {set x 1}} msg set errorInfo -} {syntax error in expression "$i<" +} {syntax error in expression "$i<": premature end of expression while executing "$z {$i<} {set x 1}"} test while-4.4 {while (not compiled): error in test expression} { @@ -609,27 +609,21 @@ 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 return - - - - - - - - - - - - -