diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2006-10-09 19:15:40 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2006-10-09 19:15:40 (GMT) |
commit | 25e6ad437c89b37b6e1b4c2283cc0eef267e9c06 (patch) | |
tree | 5d5d3889692f5fb9e51abfce3aeb3b7d346b2297 /tests/incr.test | |
parent | 57911c541c6dbf733b08171a1711081e59d2b95e (diff) | |
download | tcl-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/incr.test')
-rw-r--r-- | tests/incr.test | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/incr.test b/tests/incr.test index 9ac1443..9546db8 100644 --- a/tests/incr.test +++ b/tests/incr.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: incr.test,v 1.13 2006/03/08 16:07:43 dgp Exp $ +# RCS: @(#) $Id: incr.test,v 1.14 2006/10/09 19:15:44 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -176,7 +176,7 @@ test incr-1.18 {TclCompileIncrCmd: increment given, simple int} { test incr-1.19 {TclCompileIncrCmd: increment given, but erroneous} -body { set i 5 catch {incr i [set]} msg - set errorInfo + set ::errorInfo } -match glob -result {wrong # args: should be "set varName ?newValue?" while *ing "set"*} @@ -214,7 +214,7 @@ test incr-1.26 {TclCompileIncrCmd: runtime error, bad variable name} { incr {"foo} } 1 test incr-1.27 {TclCompileIncrCmd: runtime error, bad variable name} -body { - list [catch {incr [set]} msg] $msg $errorInfo + list [catch {incr [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"*}} @@ -222,7 +222,7 @@ test incr-1.28 {TclCompileIncrCmd: runtime error, readonly variable} -body { proc readonly args {error "variable is read-only"} set x 123 trace var x w readonly - list [catch {incr x 1} msg] $msg $errorInfo + list [catch {incr x 1} msg] $msg $::errorInfo } -match glob -result {1 {can't set "x": variable is read-only} {*variable is read-only while executing * @@ -423,7 +423,7 @@ test incr-2.19 {incr command (not compiled): increment given, but erroneous} -bo set z incr set i 5 catch {$z i [set]} msg - set errorInfo + set ::errorInfo } -match glob -result {wrong # args: should be "set varName ?newValue?" while *ing "set"*} @@ -469,7 +469,7 @@ test incr-2.26 {incr command (not compiled): runtime error, bad variable name} { } 1 test incr-2.27 {incr command (not compiled): runtime error, bad variable name} -body { set z incr - list [catch {$z [set]} msg] $msg $errorInfo + list [catch {$z [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"*}} @@ -478,7 +478,7 @@ test incr-2.28 {incr command (not compiled): runtime error, readonly variable} - proc readonly args {error "variable is read-only"} set x 123 trace var x w readonly - list [catch {$z x 1} msg] $msg $errorInfo + list [catch {$z x 1} msg] $msg $::errorInfo } -match glob -result {1 {can't set "x": variable is read-only} {*variable is read-only while executing * @@ -492,13 +492,13 @@ test incr-2.29 {incr command (not compiled): runtime error, bad variable value} test incr-2.30 {incr command (not compiled): bad increment} { set z incr set x 0 - list [catch {$z x 1a} msg] $msg $errorInfo + list [catch {$z x 1a} msg] $msg $::errorInfo } {1 {expected integer but got "1a"} {expected integer but got "1a" (reading increment) invoked from within "$z x 1a"}} test incr-2.31 {incr command (compiled): bad increment} { - list [catch {incr x 1a} msg] $msg $errorInfo + list [catch {incr x 1a} msg] $msg $::errorInfo } {1 {expected integer but got "1a"} {expected integer but got "1a" (reading increment) invoked from within |