summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpooryorick <com.digitalsmarties@pooryorick.com>2021-04-27 10:48:58 (GMT)
committerpooryorick <com.digitalsmarties@pooryorick.com>2021-04-27 10:48:58 (GMT)
commitc7fcbf756c0b7f4332a6d930cfec58945029eacd (patch)
tree89170c7d7c865a6e691bb6f6475a335dc25ff608
parent81d499ea3132322afb4b7b97c56a949ad04609ac (diff)
downloadtcl-c7fcbf756c0b7f4332a6d930cfec58945029eacd.zip
tcl-c7fcbf756c0b7f4332a6d930cfec58945029eacd.tar.gz
tcl-c7fcbf756c0b7f4332a6d930cfec58945029eacd.tar.bz2
Make tcltests.tcl continue to function even if tclTest.c isn't available.
-rw-r--r--tests/tcltests.tcl22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/tcltests.tcl b/tests/tcltests.tcl
index 4dea64f..1ee37d3 100644
--- a/tests/tcltests.tcl
+++ b/tests/tcltests.tcl
@@ -3,16 +3,18 @@
package require tcltest 2.5
namespace import ::tcltest::*
testConstraint exec [llength [info commands exec]]
-testConstraint debug [testdebug]
-testConstraint purify [testpurify]
-testConstraint debugpurify [
- expr {
- ![testConstraint memory]
- &&
- [testConstraint debug]
- &&
- [testConstraint purify]
-}]
+if {[namespace which testdebug] ne {}} {
+ testConstraint debug [testdebug]
+ testConstraint purify [testpurify]
+ testConstraint debugpurify [
+ expr {
+ ![testConstraint memory]
+ &&
+ [testConstraint debug]
+ &&
+ [testConstraint purify]
+ }]
+}
testConstraint fcopy [llength [info commands fcopy]]
testConstraint fileevent [llength [info commands fileevent]]
testConstraint thread [