~ubuntu-branches/ubuntu/dapper/tk8.0/dapper-updates

« back to all changes in this revision

Viewing changes to tests/bell.test

  • Committer: Bazaar Package Importer
  • Author(s): Mike Markley
  • Date: 2001-07-24 21:57:40 UTC
  • Revision ID: james.westby@ubuntu.com-20010724215740-r70t25rtmbqjil2h
Tags: upstream-8.0.5
ImportĀ upstreamĀ versionĀ 8.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file is a Tcl script to test out Tk's "bell" command.
 
2
# It is organized in the standard fashion for Tcl tests.
 
3
#
 
4
# Copyright (c) 1994 The Regents of the University of California.
 
5
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
 
6
# Copyright (c) 1998 by Scriptics Corporation.
 
7
#
 
8
# See the file "license.terms" for information on usage and redistribution
 
9
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 
10
#
 
11
# RCS: @(#) $Id: bell.test,v 1.3 1998/09/30 19:01:22 rjohnson Exp $
 
12
 
 
13
if {[string compare test [info procs test]] == 1} {
 
14
    source defs
 
15
}
 
16
 
 
17
test bell-1.1 {bell command} {
 
18
    list [catch {bell a} msg] $msg
 
19
} {1 {wrong # args: should be "bell ?-displayof window?"}}
 
20
test bell-1.2 {bell command} {
 
21
    list [catch {bell a b} msg] $msg
 
22
} {1 {bad option "a": must be -displayof}}
 
23
test bell-1.3 {bell command} {
 
24
    list [catch {bell -displayof gorp} msg] $msg
 
25
} {1 {bad window path name "gorp"}}
 
26
test bell-1.4 {bell command} {
 
27
    puts "Bell should ring now ..."
 
28
    flush stdout
 
29
    after 500
 
30
    bell -displayof .
 
31
    after 200
 
32
    bell -dis .
 
33
    after 200
 
34
    bell
 
35
    after 200
 
36
    bell
 
37
} {}