summaryrefslogtreecommitdiffstats
path: root/tests/for.test
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2006-10-09 19:15:40 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2006-10-09 19:15:40 (GMT)
commit25e6ad437c89b37b6e1b4c2283cc0eef267e9c06 (patch)
tree5d5d3889692f5fb9e51abfce3aeb3b7d346b2297 /tests/for.test
parent57911c541c6dbf733b08171a1711081e59d2b95e (diff)
downloadtcl-25e6ad437c89b37b6e1b4c2283cc0eef267e9c06.zip
tcl-25e6ad437c89b37b6e1b4c2283cc0eef267e9c06.tar.gz
tcl-25e6ad437c89b37b6e1b4c2283cc0eef267e9c06.tar.bz2
* tests/*.test: updated all tests to refer explicitly to thetip_278_20061009
global variables ::errorInfo, ::errorCode, ::env and ::tcl_platform: many were relying on the alternative lookup in the global namespace, that feature is tested specifically in namespace and variable tests. The modified testfiles are: apply.test, basic.test, case.test, cmdIL.test, cmdMZ.test, compExpr-old.test, error.test, eval.test, event.test, expr.test, fileSystem.test, for.test, http.test, if.test, incr-old.test, incr.test, interp.test, io.test, ioCmd.test, load.test, misc.test, namespace.test, parse.test, parseOld.test, pkg.test, proc-old.test, set.test, switch.test, tcltest.test, thread.test, var.test, while-old.test, while.test.
Diffstat (limited to 'tests/for.test')
-rw-r--r--tests/for.test18
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"