diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unixWm.test | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/tests/unixWm.test b/tests/unixWm.test index 026f665..fcce160 100644 --- a/tests/unixWm.test +++ b/tests/unixWm.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: unixWm.test,v 1.40 2004/10/05 22:04:45 hobbs Exp $ +# RCS: @(#) $Id: unixWm.test,v 1.41 2005/11/16 02:51:38 jenglish Exp $ package require tcltest 2.2 eval tcltest::configure $argv @@ -2438,16 +2438,42 @@ test unixWm-59.3 {exit processing} unix { list $error $msg } {0 {}} -test unixWm-60.1 {wm attributes} unix { +# +# wm attributes tests: +# +# NOTE: since [wm attributes] is not guaranteed to have any effect, +# the only thing we can really test here is the syntax. +# +test unixWm-60.1 {wm attributes - test} -constraints unix -body { destroy .t toplevel .t wm attributes .t -} {} -test unixWm-60.2 {wm attributes} unix { +} -result [list -alpha 1.0 -topmost 0 -zoomed 0 -fullscreen 0] + +test unixWm-60.2 {wm attributes - test} -constraints unix -body { + destroy .t + toplevel .t + wm attributes .t -topmost +} -result 0 + +test unixWm-60.3 {wm attributes - set (unrealized)} -constraints unix -body { + destroy .t + toplevel .t + wm attributes .t -topmost 1 +} + +test unixWm-60.4 {wm attributes - set (realized)} -constraints unix -body { + destroy .t + toplevel .t + tkwait visibility .t + wm attributes .t -topmost 1 +} + +test unixWm-60.5 {wm attributes - bad attribute} -constraints unix -body { destroy .t toplevel .t - list [catch {wm attributes .t -foo} msg] $msg -} {1 {wrong # args: should be "wm attributes window"}} + wm attributes .t -foo +} -returnCodes 1 -match glob -result {bad attribute "-foo":*} test unixWm-61.1 {Tk_WmCmd procedure, "iconphoto" option} unix { list [catch {wm iconph .} msg] $msg |