summaryrefslogtreecommitdiffstats
path: root/tests/unixNotfy.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unixNotfy.test')
-rw-r--r--tests/unixNotfy.test18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/unixNotfy.test b/tests/unixNotfy.test
index 2f03529..a88be90 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.
-if {[lsearch [namespace children] ::tcltest] == -1} {
+if {"::tcltest" ni [namespace children]} {
package require tcltest 2
namespace import -force ::tcltest::*
}
@@ -20,8 +20,8 @@ testConstraint noTk [expr {0 != [catch {package present Tk}]}]
testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}]
# Darwin always uses a threaded notifier
testConstraint unthreaded [expr {
- ![::tcl::pkgconfig get threaded]
- && $tcl_platform(os) ne "Darwin"
+ (![::tcl::pkgconfig get threaded]) &&
+ ($tcl_platform(os) ne "Darwin")
}]
# The next two tests will hang if threads are enabled because the notifier
@@ -30,7 +30,7 @@ testConstraint unthreaded [expr {
test unixNotfy-1.1 {Tcl_DeleteFileHandler} -constraints {noTk unix unthreaded} -body {
catch {vwait x}
set f [open [makeFile "" foo] w]
- fileevent $f writable {set x 1}
+ chan event $f writable {set x 1}
vwait x
close $f
list [catch {vwait x} msg] $msg
@@ -42,8 +42,8 @@ test unixNotfy-1.2 {Tcl_DeleteFileHandler} -constraints {noTk unix unthreaded} -
catch {vwait x}
set f1 [open [makeFile "" foo] w]
set f2 [open [makeFile "" foo2] w]
- fileevent $f1 writable {set x 1}
- fileevent $f2 writable {set y 1}
+ chan event $f1 writable {set x 1}
+ chan event $f2 writable {set y 1}
vwait x
close $f1
vwait y
@@ -61,7 +61,7 @@ test unixNotfy-2.1 {Tcl_DeleteFileHandler} \
-body {
update
set f [open [makeFile "" foo] w]
- fileevent $f writable {set x 1}
+ chan event $f writable {set x 1}
vwait x
close $f
thread::create "thread::send [thread::id] {set x ok}"
@@ -79,8 +79,8 @@ test unixNotfy-2.2 {Tcl_DeleteFileHandler} \
update
set f1 [open [makeFile "" foo] w]
set f2 [open [makeFile "" foo2] w]
- fileevent $f1 writable {set x 1}
- fileevent $f2 writable {set y 1}
+ chan event $f1 writable {set x 1}
+ chan event $f2 writable {set y 1}
vwait x
close $f1
vwait y