diff options
author | dgp <dgp@users.sourceforge.net> | 2013-01-30 20:51:43 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-01-30 20:51:43 (GMT) |
commit | dcd11ad5da4dec127b5331f936c8a00d16b4d4db (patch) | |
tree | 9103e4bbde950cbd40f65fab5a000cb53e973b98 /tests/expr-old.test | |
parent | b9691ea46a7c8f9a6182cc92385754a2e55ef5a1 (diff) | |
parent | dc03444f53228daafc69911cd9dd8fbb5b14ddc5 (diff) | |
download | tcl-dcd11ad5da4dec127b5331f936c8a00d16b4d4db.zip tcl-dcd11ad5da4dec127b5331f936c8a00d16b4d4db.tar.gz tcl-dcd11ad5da4dec127b5331f936c8a00d16b4d4db.tar.bz2 |
For Parse/eval & msgcat, select modernizations from Patrick Fradin + -debug fix
Diffstat (limited to 'tests/expr-old.test')
-rw-r--r-- | tests/expr-old.test | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/expr-old.test b/tests/expr-old.test index 4f3cb2e..06a00ba 100644 --- a/tests/expr-old.test +++ b/tests/expr-old.test @@ -13,10 +13,8 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest 2.1 - namespace import -force ::tcltest::* -} +package require tcltest 2.1 +namespace import ::tcltest::* ::tcltest::loadTestedCommands catch [list package require -exact Tcltest [info patchlevel]] @@ -145,7 +143,7 @@ test expr-old-1.50 {integer operators} {expr +36} 36 test expr-old-1.51 {integer operators} {expr +--++36} 36 test expr-old-1.52 {integer operators} {expr +36%+5} 1 test expr-old-1.53 {integer operators} { - catch {unset x} + unset -nocomplain x set x yes list [expr {1 && $x}] [expr {$x && 1}] \ [expr {0 || $x}] [expr {$x || 0}] @@ -453,7 +451,7 @@ test expr-old-23.3 {double quotes} { test expr-old-23.4 {double quotes} {expr {"11\}\}22"}} 11}}22 test expr-old-23.5 {double quotes} {expr {"\*bc"}} {*bc} test expr-old-23.6 {double quotes} { - catch {unset bogus__} + unset -nocomplain bogus__ list [catch {expr {"$bogus__"}} msg] $msg } {1 {can't read "bogus__": no such variable}} test expr-old-23.7 {double quotes} { @@ -502,7 +500,7 @@ test expr-old-26.2 {error conditions} -body { test expr-old-26.3 {error conditions} -body { expr 2+4*( } -returnCodes error -match glob -result * -catch {unset _non_existent_} +unset -nocomplain _non_existent_ test expr-old-26.4 {error conditions} { list [catch {expr 2+$_non_existent_} msg] $msg } {1 {can't read "_non_existent_": no such variable}} @@ -581,7 +579,7 @@ test expr-old-27.4 {cancelled evaluation} { expr {1?2:[set a 2]} set a } 1 -catch {unset x} +unset -nocomplain x test expr-old-27.5 {cancelled evaluation} { list [catch {expr {[info exists x] && $x}} msg] $msg } {0 0} |