os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/winConsole.test
Update contrib.
1 # This file tests the tclWinConsole.c file.
3 # This file contains a collection of tests for one or more of the Tcl
4 # built-in commands. Sourcing this file into Tcl runs the tests and
5 # generates output for errors. No output means no errors were found.
7 # Copyright (c) 1999 by Scriptics Corporation.
9 # See the file "license.terms" for information on usage and redistribution
10 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12 # RCS: @(#) $Id: winConsole.test,v 1.5 2000/04/10 17:19:06 ericm Exp $
14 if {[lsearch [namespace children] ::tcltest] == -1} {
15 package require tcltest
16 namespace import -force ::tcltest::*
20 test winConsole-1.1 {Console file channel: non-blocking gets} \
21 {pcOnly interactive} {
23 set oldmode [fconfigure stdin]
25 puts stdout "Enter abcdef<return> now: " nonewline
27 fileevent stdin readable {
28 if {[gets stdin line] >= 0} {
31 set result "gets failed"
35 fconfigure stdin -blocking 0 -buffering line
40 #cleanup the fileevent
41 fileevent stdin readable {}
42 eval fconfigure stdin $oldmode
50 ::tcltest::cleanupTests