summaryrefslogtreecommitdiffstats
path: root/tests/bell.test
diff options
context:
space:
mode:
authorrjohnson <rjohnson@noemail.net>1998-04-01 09:51:45 (GMT)
committerrjohnson <rjohnson@noemail.net>1998-04-01 09:51:45 (GMT)
commit9c5b7f2b7e472536ed2e7c915ead05e2aa264182 (patch)
tree8fb30cb152c4dc191be47fa043d2e6f5ea38c7ba /tests/bell.test
parent1d0efcbe267f2c0eb73869862522fb20fb2d63ca (diff)
downloadtk-9c5b7f2b7e472536ed2e7c915ead05e2aa264182.zip
tk-9c5b7f2b7e472536ed2e7c915ead05e2aa264182.tar.gz
tk-9c5b7f2b7e472536ed2e7c915ead05e2aa264182.tar.bz2
Initial revision
FossilOrigin-Name: 2bf55ca9aa942b581137b9f474da5ad9c1480de4
Diffstat (limited to 'tests/bell.test')
-rw-r--r--tests/bell.test34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/bell.test b/tests/bell.test
new file mode 100644
index 0000000..97d015e
--- /dev/null
+++ b/tests/bell.test
@@ -0,0 +1,34 @@
+# 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.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# SCCS: @(#) bell.test 1.5 96/04/09 23:47:12
+
+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
+ after 200
+ bell
+} {}