diff options
Diffstat (limited to 'tests/for.test')
-rw-r--r-- | tests/for.test | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/for.test b/tests/for.test index 0266de4..8665df6 100644 --- a/tests/for.test +++ b/tests/for.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: for.test,v 1.15 2006/08/22 18:10:43 dgp Exp $ +# RCS: @(#) $Id: for.test,v 1.16 2006/10/09 19:15:44 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -22,7 +22,7 @@ test for-1.1 {TclCompileForCmd: missing initial command} { list [catch {for} msg] $msg } {1 {wrong # args: should be "for start test next command"}} test for-1.2 {TclCompileForCmd: error in initial command} -body { - list [catch {for {set}} msg] $msg $errorInfo + list [catch {for {set}} msg] $msg $::errorInfo } -match glob -result {1 {wrong # args: should be "for start test next command"} {wrong # args: should be "for start test next command" while *ing "for {set}"}} @@ -33,7 +33,7 @@ test for-1.3 {TclCompileForCmd: missing test expression} { } {wrong # args: should be "for start test next command"} test for-1.4 {TclCompileForCmd: error in test expression} -body { catch {for {set i 0} {$i<}} msg - set errorInfo + set ::errorInfo } -match glob -result {wrong # args: should be "for start test next command" while *ing "for {set i 0} {$i<}"} @@ -51,7 +51,7 @@ test for-1.7 {TclCompileForCmd: missing command body} { } {wrong # args: should be "for start test next command"} test for-1.8 {TclCompileForCmd: error compiling command body} -body { catch {for {set i 0} {$i < 5} {incr i} {set}} msg - set errorInfo + set ::errorInfo } -match glob -result {wrong # args: should be "set varName ?newValue?" while *ing "set"*} @@ -82,7 +82,7 @@ test for-1.11 {TclCompileForCmd: computed command body} { } {x1} test for-1.12 {TclCompileForCmd: error in "next" command} -body { catch {for {set i 0} {$i < 5} {set} {format $i}} msg - set errorInfo + set ::errorInfo } -match glob -result {wrong # args: should be "set varName ?newValue?" while *ing "set"*} @@ -652,7 +652,7 @@ test for-6.5 {Tcl_ForObjCmd: number of args} { } {wrong # args: should be "for start test next command"} test for-6.6 {Tcl_ForObjCmd: error in initial command} -body { set z for - list [catch {$z {set} {$i < 5} {incr i} {body}} msg] $msg $errorInfo + list [catch {$z {set} {$i < 5} {incr i} {body}} msg] $msg $::errorInfo } -match glob -result {1 {wrong # args: should be "set varName ?newValue?"} {wrong # args: should be "set varName ?newValue?" while *ing "set" @@ -662,7 +662,7 @@ test for-6.6 {Tcl_ForObjCmd: error in initial command} -body { test for-6.7 {Tcl_ForObjCmd: error in test expression} -body { set z for catch {$z {set i 0} {i < 5} {incr i} {body}} - set errorInfo + set ::errorInfo } -match glob -result {*"$z {set i 0} {i < 5} {incr i} {body}"} test for-6.8 {Tcl_ForObjCmd: test expression is enclosed in quotes} { set z for @@ -673,7 +673,7 @@ test for-6.8 {Tcl_ForObjCmd: test expression is enclosed in quotes} { test for-6.9 {Tcl_ForObjCmd: error executing command body} -body { set z for catch {$z {set i 0} {$i < 5} {incr i} {set}} msg - set errorInfo + set ::errorInfo } -match glob -result {wrong # args: should be "set varName ?newValue?" while *ing "set" @@ -710,7 +710,7 @@ test for-6.12 {Tcl_ForObjCmd: computed command body} { test for-6.13 {Tcl_ForObjCmd: error in "next" command} -body { set z for catch {$z {set i 0} {$i < 5} {set} {set j 4}} msg - set errorInfo + set ::errorInfo } -match glob -result {wrong # args: should be "set varName ?newValue?" while *ing "set" |