OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tk/] [tests/] [cmds.test] - Blame information for rev 1775

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# This file is a Tcl script to test the procedures in the file
2
# tkCmds.c.  It is organized in the standard fashion for Tcl tests.
3
#
4
# Copyright (c) 1996 Sun Microsystems, Inc.
5
#
6
# See the file "license.terms" for information on usage and redistribution
7
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8
#
9
# RCS: @(#) $Id: cmds.test,v 1.1.1.1 2002-01-16 10:25:58 markom Exp $
10
 
11
if {[string compare test [info procs test]] == 1} {
12
    source defs
13
}
14
 
15
eval destroy [winfo child .]
16
wm geometry . {}
17
update
18
 
19
test cmds-1.1 {tkwait visibility, argument errors} {
20
    list [catch {tkwait visibility} msg] $msg
21
} {1 {wrong # args: should be "tkwait variable|visibility|window name"}}
22
test cmds-1.2 {tkwait visibility, argument errors} {
23
    list [catch {tkwait visibility foo bar} msg] $msg
24
} {1 {wrong # args: should be "tkwait variable|visibility|window name"}}
25
test cmds-1.3 {tkwait visibility, argument errors} {
26
    list [catch {tkwait visibility bad_window} msg] $msg
27
} {1 {bad window path name "bad_window"}}
28
test cmds-1.4 {tkwait visibility, waiting for window to be mapped} {
29
    button .b -text "Test"
30
    set x init
31
    after 100 {set x delay; place .b -x 0 -y 0}
32
    tkwait visibility .b
33
    destroy .b
34
    set x
35
} {delay}
36
test cmds-1.5 {tkwait visibility, window gets deleted} {
37
    frame .f
38
    button .f.b -text "Test"
39
    pack .f.b
40
    set x init
41
    after 100 {set x deleted; destroy .f}
42
    list [catch {tkwait visibility .f.b} msg] $msg $x
43
} {1 {window ".f.b" was deleted before its visibility changed} deleted}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.