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)
commitda7cc28446f80fb4051f898b794d7e0f6c847c43 (patch)
tree0f4ea9dd1b1a3a6de75a966dc60b4e052ee13ad9 /tests/socket.test
parente6e391530f4f9d538f8976887bf01c8fcadc9d46 (diff)
downloadtcl-da7cc28446f80fb4051f898b794d7e0f6c847c43.zip
tcl-da7cc28446f80fb4051f898b794d7e0f6c847c43.tar.gz
tcl-da7cc28446f80fb4051f898b794d7e0f6c847c43.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-}]}]