summaryrefslogtreecommitdiffstats
path: root/tests/main.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-03-21 11:12:27 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-03-21 11:12:27 (GMT)
commit86ca5531ac0818f99726ba9ad478e277cd5d6e94 (patch)
treecb78904bbef94025a4f19257afc9211ee618e8ce /tests/main.test
parentd4070e928ea23c067c492b5e594d206a76d9b3d5 (diff)
downloadtcl-86ca5531ac0818f99726ba9ad478e277cd5d6e94.zip
tcl-86ca5531ac0818f99726ba9ad478e277cd5d6e94.tar.gz
tcl-86ca5531ac0818f99726ba9ad478e277cd5d6e94.tar.bz2
Use test constraints properly instead of looking in tcl_platform
Consistent method of calling test constraints, and (try to) move constraint setup to the top of the test file
Diffstat (limited to 'tests/main.test')
-rw-r--r--tests/main.test18
1 files changed, 4 insertions, 14 deletions
diff --git a/tests/main.test b/tests/main.test
index 3a14789..5eab892 100644
--- a/tests/main.test
+++ b/tests/main.test
@@ -1,6 +1,6 @@
# This file contains a collection of tests for generic/tclMain.c.
#
-# RCS: @(#) $Id: main.test,v 1.17 2006/02/09 15:22:52 dgp Exp $
+# RCS: @(#) $Id: main.test,v 1.18 2006/03/21 11:12:29 dkf Exp $
if {[catch {package require tcltest 2.0.2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required."
@@ -8,15 +8,7 @@ if {[catch {package require tcltest 2.0.2}]} {
}
namespace eval ::tcl::test::main {
-
- namespace import ::tcltest::test
- namespace import ::tcltest::testConstraint
- namespace import ::tcltest::interpreter
- namespace import ::tcltest::cleanupTests
- namespace import ::tcltest::makeFile
- namespace import ::tcltest::removeFile
- namespace import ::tcltest::temporaryDirectory
- namespace import ::tcltest::workingDirectory
+ namespace import ::tcltest::*
# Is [exec] defined?
testConstraint exec [llength [info commands exec]]
@@ -615,8 +607,7 @@ namespace eval ::tcl::test::main {
after cancel $id
set wait
} -cleanup {
- if {[string equal timeout $wait]
- && [string equal unix $::tcl_platform(platform)]} {
+ if {[string equal timeout $wait] && [testConstraint unix]} {
exec kill [pid $f]
}
close $f
@@ -639,8 +630,7 @@ namespace eval ::tcl::test::main {
after cancel $id
set wait
} -cleanup {
- if {[string equal timeout $wait]
- && [string equal unix $::tcl_platform(platform)]} {
+ if {[string equal timeout $wait] && [testConstraint unix]} {
exec kill [pid $f]
}
close $f