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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tk/] [tests/] [cmds.test] - Rev 1765

Compare with Previous | Blame | View Log

# This file is a Tcl script to test the procedures in the file
# tkCmds.c.  It is organized in the standard fashion for Tcl tests.
#
# Copyright (c) 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.
#
# RCS: @(#) $Id: cmds.test,v 1.1.1.1 2002-01-16 10:25:58 markom Exp $

if {[string compare test [info procs test]] == 1} {
    source defs
}

eval destroy [winfo child .]
wm geometry . {}
update

test cmds-1.1 {tkwait visibility, argument errors} {
    list [catch {tkwait visibility} msg] $msg
} {1 {wrong # args: should be "tkwait variable|visibility|window name"}}
test cmds-1.2 {tkwait visibility, argument errors} {
    list [catch {tkwait visibility foo bar} msg] $msg
} {1 {wrong # args: should be "tkwait variable|visibility|window name"}}
test cmds-1.3 {tkwait visibility, argument errors} {
    list [catch {tkwait visibility bad_window} msg] $msg
} {1 {bad window path name "bad_window"}}
test cmds-1.4 {tkwait visibility, waiting for window to be mapped} {
    button .b -text "Test"
    set x init
    after 100 {set x delay; place .b -x 0 -y 0}
    tkwait visibility .b
    destroy .b
    set x
} {delay}
test cmds-1.5 {tkwait visibility, window gets deleted} {
    frame .f
    button .f.b -text "Test"
    pack .f.b
    set x init
    after 100 {set x deleted; destroy .f}
    list [catch {tkwait visibility .f.b} msg] $msg $x
} {1 {window ".f.b" was deleted before its visibility changed} deleted}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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