blob: 0c8876973defa4e5d5ca853c4e53c2b65d900038 (
plain)
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
31
32
33
34
35
36
37
|
# This file is a Tcl script to test out Tk's "bell" command.
# It is organized in the standard fashion for Tcl tests.
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998 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: bell.test,v 1.3 1998/09/30 19:01:22 rjohnson Exp $
if {[string compare test [info procs test]] == 1} {
source defs
}
test bell-1.1 {bell command} {
list [catch {bell a} msg] $msg
} {1 {wrong # args: should be "bell ?-displayof window?"}}
test bell-1.2 {bell command} {
list [catch {bell a b} msg] $msg
} {1 {bad option "a": must be -displayof}}
test bell-1.3 {bell command} {
list [catch {bell -displayof gorp} msg] $msg
} {1 {bad window path name "gorp"}}
test bell-1.4 {bell command} {
puts "Bell should ring now ..."
flush stdout
after 500
bell -displayof .
after 200
bell -dis .
after 200
bell
after 200
bell
} {}
|