summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-05-17 22:44:09 (GMT)
committerhobbs <hobbs>2000-05-17 22:44:09 (GMT)
commit71215bc2afcd3025cd57931919fe87b990bcd75e (patch)
treea1f1f3a1e36f8876528e945ad7a001f84cb27b9f /tests
parent12614611674bc0a6afb0634fb27c5974472b6b06 (diff)
downloadtk-71215bc2afcd3025cd57931919fe87b990bcd75e.zip
tk-71215bc2afcd3025cd57931919fe87b990bcd75e.tar.gz
tk-71215bc2afcd3025cd57931919fe87b990bcd75e.tar.bz2
* doc/bell.n:
* tests/bell.test: * generic/tkCmds.c (Tk_BellObjCmd): added -nice option to optionally avoid resetting screen saver [Bug: 4279]
Diffstat (limited to 'tests')
-rw-r--r--tests/bell.test24
1 files changed, 18 insertions, 6 deletions
diff --git a/tests/bell.test b/tests/bell.test
index e8c2040..96b7a74 100644
--- a/tests/bell.test
+++ b/tests/bell.test
@@ -2,10 +2,10 @@
# It is organized in the standard fashion for Tcl tests.
#
# Copyright (c) 1994 The Regents of the University of California.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright (c) 1998-2000 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: bell.test,v 1.4 1999/04/16 01:51:33 stanton Exp $
+# RCS: @(#) $Id: bell.test,v 1.5 2000/05/17 22:44:10 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -13,20 +13,32 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
test bell-1.1 {bell command} {
list [catch {bell a} msg] $msg
-} {1 {wrong # args: should be "bell ?-displayof window?"}}
+} {1 {bad option "a": must be -displayof or -nice}}
test bell-1.2 {bell command} {
list [catch {bell a b} msg] $msg
-} {1 {bad option "a": must be -displayof}}
+} {1 {bad option "a": must be -displayof or -nice}}
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} {
+ list [catch {bell -nice -displayof} msg] $msg
+} {1 {wrong # args: should be "bell ?-displayof window? ?-nice?"}}
+test bell-1.5 {bell command} {
+ list [catch {bell -nice -nice -nice} msg] $msg
+} {0 {}}
+test bell-1.6 {bell command} {
+ list [catch {bell -displayof . -nice} msg] $msg
+} {0 {}}
+test bell-1.7 {bell command} {
+ list [catch {bell -nice -displayof . -nice} msg] $msg
+} {1 {wrong # args: should be "bell ?-displayof window? ?-nice?"}}
+test bell-1.8 {bell command} {
puts "Bell should ring now ..."
flush stdout
- after 500
+ after 200
bell -displayof .
after 200
- bell
+ bell -nice
after 200
bell
} {}