summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhershey <hershey>1998-07-28 10:37:18 (GMT)
committerhershey <hershey>1998-07-28 10:37:18 (GMT)
commitb58c7260ecf6cdb6a6a3ebf94e64da146b4105dc (patch)
tree4abdd55a7da8a6eec8086b8cd08e038496b17860
parent50fb089ec256bc13b1a6ebac95497eb0808dfc72 (diff)
downloadtcl-b58c7260ecf6cdb6a6a3ebf94e64da146b4105dc.zip
tcl-b58c7260ecf6cdb6a6a3ebf94e64da146b4105dc.tar.gz
tcl-b58c7260ecf6cdb6a6a3ebf94e64da146b4105dc.tar.bz2
check for test commands before running tests.
-rw-r--r--tests/basic.test4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/basic.test b/tests/basic.test
index 502e3e5..a3b8c6b 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -259,6 +259,7 @@ test basic-7.6 {TclRenameCommand, check for command shadowing by newly renamed c
[test_ns_basic::callP]
} {{p in ::} {} {q in ::test_ns_basic}}
+if {[info command testcmdtoken] != {}} {
test basic-8.1 {Tcl_GetCommandInfo, names for commands created inside namespaces} {
catch {eval namespace delete [namespace children :: test_ns_*]}
catch {rename p ""}
@@ -279,6 +280,7 @@ test basic-8.2 {Tcl_GetCommandInfo, names for commands created outside namespace
[rename test_ns_basic::test_ns_basic2::p q] \
[testcmdtoken name $x]
} {{p ::test_ns_basic::test_ns_basic2::p} {} {q ::q}}
+}
test basic-9.1 {Tcl_GetCommandFullName} {
catch {eval namespace delete [namespace children :: test_ns_*]}
@@ -380,12 +382,14 @@ test basic-11.1 {TclObjInvoke, lookup of "unknown" command} {
[interp delete test_interp]
} {newAlias 0 {global unknown} {}}
+if {[info command testcmdtrace] != {}} {
test basic-12.1 {Tcl_CreateTrace, correct command and argc/argv arguments of trace proc} {
testcmdtrace tracetest {set stuff [info tclversion]}
} {{info tclversion} {info tclversion} {set stuff [info tclversion]} {set stuff 8.0}}
test basic-12.2 {Tcl_CreateTrace, correct command and argc/argv arguments of trace proc} {
testcmdtrace deletetest {set stuff [info tclversion]}
} 8.0
+}
catch {eval namespace delete [namespace children :: test_ns_*]}
catch {namespace delete george}