summaryrefslogtreecommitdiffstats
path: root/tests/if-old.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/if-old.test')
-rw-r--r--tests/if-old.test7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/if-old.test b/tests/if-old.test
index fbcf56c..e08ec45 100644
--- a/tests/if-old.test
+++ b/tests/if-old.test
@@ -13,7 +13,7 @@
# 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} {
+if {"::tcltest" ni [namespace children]} {
package require tcltest
namespace import -force ::tcltest::*
}
@@ -60,12 +60,11 @@ test if-old-1.8 {taking proper branch} {
} {4}
test if-old-1.9 {taking proper branch, multiline test expr} {
set a {}
- if {($tcl_platform(platform) != "foobar1") && \
- ($tcl_platform(platform) != "foobar2")} {set a 3} else {set a 4}
+ if {($tcl_platform(platform) ne "foobar1") &&
+ ($tcl_platform(platform) ne "foobar2")} {set a 3} else {set a 4}
set a
} {3}
-
test if-old-2.1 {optional then-else args} {
set a 44
if 0 then {set a 1} elseif 0 then {set a 3} else {set a 2}