From c7fcbf756c0b7f4332a6d930cfec58945029eacd Mon Sep 17 00:00:00 2001 From: pooryorick Date: Tue, 27 Apr 2021 10:48:58 +0000 Subject: Make tcltests.tcl continue to function even if tclTest.c isn't available. --- tests/tcltests.tcl | 22 ++++++++++++---------- 1 file 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 [ -- cgit v0.12