summaryrefslogtreecommitdiffstats
path: root/tests/if.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/if.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/if.test')
-rw-r--r--tests/if.test18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/if.test b/tests/if.test
index 5f625b9..4f46354 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.11 2006/08/22 18:10:44 dgp Exp $
+# RCS: @(#) $Id: if.test,v 1.12 2006/10/09 19:15:44 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -27,7 +27,7 @@ test if-1.2 {TclCompileIfCmd: error in if/elseif test} {
list [catch {if {[error "error in condition"]} foo} msg] $msg
} {1 {error in condition}}
test if-1.3 {TclCompileIfCmd: error in if/elseif test} -body {
- list [catch {if {1+}} msg] $msg $errorInfo
+ list [catch {if {1+}} msg] $msg $::errorInfo
} -match glob -result {1 * {*"if {1+}"}}
test if-1.4 {TclCompileIfCmd: if/elseif test in braces} {
set a {}
@@ -62,7 +62,7 @@ test if-1.9 {TclCompileIfCmd: missing "then" body} {
} {wrong # args: no script following "then" argument}
test if-1.10 {TclCompileIfCmd: error in "then" body} -body {
set a {}
- list [catch {if {$a!="xxx"} then {set}} msg] $msg $errorInfo
+ list [catch {if {$a!="xxx"} then {set}} msg] $msg $::errorInfo
} -match glob -result {1 {wrong # args: should be "set varName ?newValue?"} {wrong # args: should be "set varName ?newValue?"
while *ing
"set"*}}
@@ -173,7 +173,7 @@ test if-2.3 {TclCompileIfCmd: missing expression after "elseif"} {
} {wrong # args: no expression after "elseif" argument}
test if-2.4 {TclCompileIfCmd: error in expression after "elseif"} -body {
set a {}
- list [catch {if 3>4 {set a 1} elseif {1>}} msg] $msg $errorInfo
+ list [catch {if 3>4 {set a 1} elseif {1>}} msg] $msg $::errorInfo
} -match glob -result {1 * {*"if 3>4 {set a 1} elseif {1>}"}}
test if-2.5 {TclCompileIfCmd: test jumpFalse instruction replacement after long "elseif" body} {
catch {unset i}
@@ -298,7 +298,7 @@ test if-3.3 {TclCompileIfCmd: missing body after "else"} {
test if-3.4 {TclCompileIfCmd: error compiling body after "else"} -body {
set a {}
catch {if 2<1 {set a 1} else {set}} msg
- set errorInfo
+ set ::errorInfo
} -match glob -result {wrong # args: should be "set varName ?newValue?"
while *ing
"set"*}
@@ -499,7 +499,7 @@ test if-5.2 {if cmd with computed command names: error in if/elseif test} {
} {1 {error in condition}}
test if-5.3 {if cmd with computed command names: error in if/elseif test} -body {
set z if
- list [catch {$z {1+}} msg] $msg $errorInfo
+ list [catch {$z {1+}} msg] $msg $::errorInfo
} -match glob -result {1 * {*"$z {1+}"}}
test if-5.4 {if cmd with computed command names: if/elseif test in braces} {
set z if
@@ -541,7 +541,7 @@ test if-5.9 {if cmd with computed command names: missing "then" body} {
test if-5.10 {if cmd with computed command names: error in "then" body} -body {
set z if
set a {}
- list [catch {$z {$a!="xxx"} then {set}} msg] $msg $errorInfo
+ list [catch {$z {$a!="xxx"} then {set}} msg] $msg $::errorInfo
} -match glob -result {1 {wrong # args: should be "set varName ?newValue?"} {wrong # args: should be "set varName ?newValue?"
while *ing
"set"
@@ -665,7 +665,7 @@ test if-6.3 {if cmd with computed command names: missing expression after "elsei
test if-6.4 {if cmd with computed command names: error in expression after "elseif"} -body {
set z if
set a {}
- list [catch {$z 3>4 {set a 1} elseif {1>}} msg] $msg $errorInfo
+ list [catch {$z 3>4 {set a 1} elseif {1>}} msg] $msg $::errorInfo
} -match glob -result {1 * {*"$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} {
set z if
@@ -795,7 +795,7 @@ test if-7.4 {if cmd with computed command names: error compiling body after "els
set z if
set a {}
catch {$z 2<1 {set a 1} else {set}} msg
- set errorInfo
+ set ::errorInfo
} -match glob -result {wrong # args: should be "set varName ?newValue?"
while *ing
"set"