summaryrefslogtreecommitdiffstats
path: root/tests/winConsole.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/winConsole.test')
-rw-r--r--tests/winConsole.test15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/winConsole.test b/tests/winConsole.test
index fdde41c..2e0e904 100644
--- a/tests/winConsole.test
+++ b/tests/winConsole.test
@@ -9,18 +9,17 @@
# 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
namespace import -force ::tcltest::*
}
-
test winConsole-1.1 {Console file channel: non-blocking gets} {win interactive} {
- set oldmode [fconfigure stdin]
+ set oldmode [chan configure stdin]
puts stdout "Enter abcdef<return> now: " nonewline
flush stdout
- fileevent stdin readable {
+ chan event stdin readable {
if {[gets stdin line] >= 0} {
set result $line
} else {
@@ -28,14 +27,14 @@ test winConsole-1.1 {Console file channel: non-blocking gets} {win interactive}
}
}
- fconfigure stdin -blocking 0 -buffering line
+ chan configure stdin -blocking 0 -buffering line
set result {}
vwait result
- #cleanup the fileevent
- fileevent stdin readable {}
- fconfigure stdin {*}$oldmode
+ #cleanup the chan event
+ chan event stdin readable {}
+ chan configure stdin {*}$oldmode
set result