diff options
Diffstat (limited to 'tests/unixNotfy.test')
-rw-r--r-- | tests/unixNotfy.test | 23 |
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] |