summaryrefslogtreecommitdiffstats
path: root/tests/socket.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-07-18 10:00:52 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-07-18 10:00:52 (GMT)
commit1990c76e8d05fcf48cccabb5d2f1a49c3c99ecd1 (patch)
tree0f4ea9dd1b1a3a6de75a966dc60b4e052ee13ad9 /tests/socket.test
parentb1ce77efec5ae88c40c52c8c2dfef2ec0120876f (diff)
downloadtcl-1990c76e8d05fcf48cccabb5d2f1a49c3c99ecd1.zip
tcl-1990c76e8d05fcf48cccabb5d2f1a49c3c99ecd1.tar.gz
tcl-1990c76e8d05fcf48cccabb5d2f1a49c3c99ecd1.tar.bz2
Make sure the "sockettest" command is available even when running socket.test individually.
Diffstat (limited to 'tests/socket.test')
-rw-r--r--tests/socket.test9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/socket.test b/tests/socket.test
index 8ffd86b..29f1015 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -60,8 +60,13 @@
# listening at port 2048. If all fails, a message is printed and the tests
# using the remote server are not performed.
-package require tcltest 2
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest
+ namespace import -force ::tcltest::*
+}
+
+::tcltest::loadTestedCommands
+catch [list package require -exact Tcltest [info patchlevel]]
# Some tests require the Thread package or exec command
testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}]