diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-01-01 15:14:42 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-01-01 15:14:42 (GMT) |
commit | a6cdf257c61c62aa64357851af8f6e376b7f8881 (patch) | |
tree | 06031b0878fe01f3aa9ec4610a723046d9c4fe24 /tests/namespace-old.test | |
parent | 52a3d5af143656324d78483b244f92addfbe6176 (diff) | |
download | tcl-a6cdf257c61c62aa64357851af8f6e376b7f8881.zip tcl-a6cdf257c61c62aa64357851af8f6e376b7f8881.tar.gz tcl-a6cdf257c61c62aa64357851af8f6e376b7f8881.tar.bz2 |
Clean up of tests and conversion to tcltest 2. Target has been to get init and
cleanup code out of the test body and into the -setup/-cleanup stanzas.
Diffstat (limited to 'tests/namespace-old.test')
-rw-r--r-- | tests/namespace-old.test | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/namespace-old.test b/tests/namespace-old.test index 804c233..f4d4598 100644 --- a/tests/namespace-old.test +++ b/tests/namespace-old.test @@ -14,9 +14,9 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace-old.test,v 1.14 2008/12/17 15:39:55 dkf Exp $ +# RCS: @(#) $Id: namespace-old.test,v 1.15 2011/01/01 15:14:43 dkf Exp $ -if {[lsearch [namespace children] ::tcltest] == -1} { +if {"::tcltest" ni [namespace children]} { package require tcltest 2.2 namespace import -force ::tcltest::* } @@ -496,8 +496,8 @@ test namespace-old-7.1 {define test namespace} { } } {} test namespace-old-7.2 {uplevel can access namespace call frame} { - list [expr {[lsearch -exact [test_ns_uplevel::test_uplevel 1] x]>=0}] \ - [expr {[lsearch -exact [test_ns_uplevel::test_uplevel 1] y]>=0}] + list [expr {"x" in [test_ns_uplevel::test_uplevel 1]}] \ + [expr {"y" in [test_ns_uplevel::test_uplevel 1]}] } {1 1} test namespace-old-7.3 {uplevel can go beyond namespace call frame} { lsort [test_ns_uplevel::test_uplevel 2] @@ -506,8 +506,8 @@ test namespace-old-7.4 {uplevel can go up to global context} { expr {[test_ns_uplevel::test_uplevel 3] == [info globals]} } {1} test namespace-old-7.5 {absolute call frame references work too} { - list [expr {[lsearch -exact [test_ns_uplevel::test_uplevel #2] x]>=0}] \ - [expr {[lsearch -exact [test_ns_uplevel::test_uplevel #2] y]>=0}] + list [expr {"x" in [test_ns_uplevel::test_uplevel #2]}] \ + [expr {"y" in [test_ns_uplevel::test_uplevel #2]}] } {1 1} test namespace-old-7.6 {absolute call frame references work too} { lsort [test_ns_uplevel::test_uplevel #1] |