1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
-
+
-
+
-
+
-
+
-
+
|
# This file contains a collection of tests for the procedures in the file
# tclEvent.c, which includes the "update", and "vwait" Tcl
# commands. Sourcing this file into Tcl runs the tests and generates
# output for errors. No output means no errors were found.
#
# Copyright (c) 1995-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: event.test,v 1.15 2002/01/27 11:09:23 das Exp $
# RCS: @(#) $Id: event.test,v 1.16 2002/06/22 04:19:47 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
package require tcltest 2
namespace import -force ::tcltest::*
}
set ::tcltest::testConstraints(testfilehandler) \
::tcltest::testConstraint testfilehandler \
[expr {[info commands testfilehandler] != {}}]
set ::tcltest::testConstraints(testexithandler) \
::tcltest::testConstraint testexithandler \
[expr {[info commands testexithandler] != {}}]
set ::tcltest::testConstraints(testfilewait) \
::tcltest::testConstraint testfilewait \
[expr {[info commands testfilewait] != {}}]
test event-1.1 {Tcl_CreateFileHandler, reading} {testfilehandler} {
testfilehandler close
testfilehandler create 0 readable off
testfilehandler clear 0
testfilehandler oneevent
|