summaryrefslogtreecommitdiffstats
path: root/tests/unixNotfy.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-05-19 20:15:29 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-05-19 20:15:29 (GMT)
commite52d9cbf151b4d4106c36834e820db9442ec9a3b (patch)
treeb07002700fcbcc6b4ed86c424196b744184971a1 /tests/unixNotfy.test
parentcc56afda247802cb646330c25f3f03db20b1a43d (diff)
downloadtcl-e52d9cbf151b4d4106c36834e820db9442ec9a3b.zip
tcl-e52d9cbf151b4d4106c36834e820db9442ec9a3b.tar.gz
tcl-e52d9cbf151b4d4106c36834e820db9442ec9a3b.tar.bz2
Massive test cleanup; all tests are run, and constraints are used where necessary.
Diffstat (limited to 'tests/unixNotfy.test')
-rw-r--r--tests/unixNotfy.test23
1 files changed, 8 insertions, 15 deletions
diff --git a/tests/unixNotfy.test b/tests/unixNotfy.test
index d8f5a4c..2840813 100644
--- a/tests/unixNotfy.test
+++ b/tests/unixNotfy.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: unixNotfy.test,v 1.13 2003/10/06 14:32:22 dgp Exp $
+# RCS: @(#) $Id: unixNotfy.test,v 1.14 2004/05/19 20:15:32 dkf Exp $
# The tests should not be run if you have a notifier which is unable to
# detect infinite vwaits, as the tests below will hang. The presence of
@@ -21,21 +21,16 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
namespace import -force ::tcltest::*
}
-if {[info exists tk_version]} {
- puts "When run in a Tk shell, these tests run hang. Skipping tests ..."
- ::tcltest::cleanupTests
- return
-}
-
-set ::tcltest::testConstraints(testthread) \
- [expr {[info commands testthread] != {}}]
+# When run in a Tk shell, these tests hang.
+testConstraint noTk [expr {![info exists tk_version]}]
+testConstraint testthread [expr {[info commands testthread] != {}}]
# The next two tests will hang if threads are enabled because the notifier
# will not necessarily wait for ever in this case, so it does not generate
# an error.
test unixNotfy-1.1 {Tcl_DeleteFileHandler} \
- -constraints {unixOnly && !testthread} \
+ -constraints {noTk && unixOnly && !testthread} \
-body {
catch {vwait x}
set f [open [makeFile "" foo] w]
@@ -49,9 +44,8 @@ test unixNotfy-1.1 {Tcl_DeleteFileHandler} \
catch { close $f }
catch { removeFile foo }
}
-
test unixNotfy-1.2 {Tcl_DeleteFileHandler} \
- -constraints {unixOnly && !testthread} \
+ -constraints {noTk && unixOnly && !testthread} \
-body {
catch {vwait x}
set f1 [open [makeFile "" foo] w]
@@ -73,7 +67,7 @@ test unixNotfy-1.2 {Tcl_DeleteFileHandler} \
}
test unixNotfy-2.1 {Tcl_DeleteFileHandler} \
- -constraints {unixOnly testthread} \
+ -constraints {noTk unixOnly testthread} \
-body {
update
set f [open [makeFile "" foo] w]
@@ -91,9 +85,8 @@ test unixNotfy-2.1 {Tcl_DeleteFileHandler} \
catch { close $f }
catch { removeFile foo }
}
-
test unixNotfy-2.2 {Tcl_DeleteFileHandler} \
- -constraints {unixOnly testthread} \
+ -constraints {noTk unixOnly testthread} \
-body {
update
set f1 [open [makeFile "" foo] w]