diff options
Diffstat (limited to 'tests/if.test')
-rw-r--r-- | tests/if.test | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/tests/if.test b/tests/if.test index 5cb269d..1c79ef2 100644 --- a/tests/if.test +++ b/tests/if.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: if.test,v 1.6 2001/09/19 18:17:54 hobbs Exp $ +# RCS: @(#) $Id: if.test,v 1.7 2001/12/04 15:36:29 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -28,7 +28,7 @@ test if-1.2 {TclCompileIfCmd: error in if/elseif test} { } {1 {error in condition}} test if-1.3 {TclCompileIfCmd: error in if/elseif test} { list [catch {if {1+}} msg] $msg $errorInfo -} {1 {syntax error in expression "1+"} {syntax error in expression "1+" +} {1 {syntax error in expression "1+": premature end of expression} {syntax error in expression "1+": premature end of expression ("if" test expression) while compiling "if {1+}"}} @@ -180,7 +180,7 @@ test if-2.3 {TclCompileIfCmd: missing expression after "elseif"} { test if-2.4 {TclCompileIfCmd: error in expression after "elseif"} { set a {} list [catch {if 3>4 {set a 1} elseif {1>}} msg] $msg $errorInfo -} {1 {syntax error in expression "1>"} {syntax error in expression "1>" +} {1 {syntax error in expression "1>": premature end of expression} {syntax error in expression "1>": premature end of expression ("if" test expression) while compiling "if 3>4 {set a 1} elseif {1>}"}} @@ -512,7 +512,7 @@ test if-5.2 {if cmd with computed command names: error in if/elseif test} { test if-5.3 {if cmd with computed command names: error in if/elseif test} { set z if list [catch {$z {1+}} msg] $msg $errorInfo -} {1 {syntax error in expression "1+"} {syntax error in expression "1+" +} {1 {syntax error in expression "1+": premature end of expression} {syntax error in expression "1+": premature end of expression while executing "$z {1+}"}} test if-5.4 {if cmd with computed command names: if/elseif test in braces} { @@ -680,7 +680,7 @@ test if-6.4 {if cmd with computed command names: error in expression after "else set z if set a {} list [catch {$z 3>4 {set a 1} elseif {1>}} msg] $msg $errorInfo -} {1 {syntax error in expression "1>"} {syntax error in expression "1>" +} {1 {syntax error in expression "1>": premature end of expression} {syntax error in expression "1>": premature end of expression while executing "$z 3>4 {set a 1} elseif {1>}"}} test if-6.5 {if cmd with computed command names: test jumpFalse instruction replacement after long "elseif" body} { @@ -1108,20 +1108,8 @@ test if-10.6 {double invocation of variable traces} { list [catch {if "$iftracevar + 20" {}} a] $a \ [catch {if "$iftracevar + 20" {}} b] $b \ [unset iftracevar iftracecounter] -} {1 {syntax error in expression "1 oops 10 + 20"} 0 {} {}} +} {1 {syntax error in expression "1 oops 10 + 20": extra tokens at end of expression} 0 {} {}} # cleanup ::tcltest::cleanupTests return - - - - - - - - - - - - |