diff options
author | pspjuth <pspjuth@noemail.net> | 2003-07-16 23:17:35 (GMT) |
---|---|---|
committer | pspjuth <pspjuth@noemail.net> | 2003-07-16 23:17:35 (GMT) |
commit | 9d04bd39c7d11b5c2e19cbec274773595d7099a2 (patch) | |
tree | b771442ab219f21be34c5dc9b6401bdcffa7cb13 /tests/frame.test | |
parent | 5686b9deda08a0d9c7fa0b4d6438bbf834e181e7 (diff) | |
download | tk-9d04bd39c7d11b5c2e19cbec274773595d7099a2.zip tk-9d04bd39c7d11b5c2e19cbec274773595d7099a2.tar.gz tk-9d04bd39c7d11b5c2e19cbec274773595d7099a2.tar.bz2 |
Make sure all options can be set
to their default value. [Bug #697652]
FossilOrigin-Name: 7f183fb8c3521ffb36ae64d59cb7ce064b390b42
Diffstat (limited to 'tests/frame.test')
-rw-r--r-- | tests/frame.test | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/tests/frame.test b/tests/frame.test index 4acd84b..e1e1e85 100644 --- a/tests/frame.test +++ b/tests/frame.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: frame.test,v 1.7 2002/07/14 05:48:46 dgp Exp $ +# RCS: @(#) $Id: frame.test,v 1.7.2.1 2003/07/16 23:17:39 pspjuth Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -89,8 +89,21 @@ test frame-1.7 {frame configuration options} { destroy .f set result } {1 {can't modify -container option after widget is created}} +test frame-1.8 {frame configuration options} { + # Make sure all options can be set to the default value + frame .f + set opts {} + foreach opt [.f configure] { + if {[llength $opt] == 5} { + lappend opts [lindex $opt 0] [lindex $opt 4] + } + } + eval frame .g $opts + destroy .f .g +} {} + frame .f -set i 8 +set i 9 foreach test { {-background #ff0000 #ff0000 non-existent {unknown color name "non-existent"}} @@ -141,7 +154,7 @@ test frame-2.2 {toplevel configuration options} { } {{-colormap colormap Colormap {} new} 1 {can't modify -colormap option after widget is created}} test frame-2.3 {toplevel configuration options} { catch {destroy .t} - toplevel .t -width 200 -height 100 + toplevel .t -width 200 -height 100 -colormap {} -use {} wm geometry .t +0+0 list [catch {.t configure -container 1} msg] $msg [.t configure -container] } {1 {can't modify -container option after widget is created} {-container container Container 0 0}} @@ -189,12 +202,24 @@ test frame-2.10 {toplevel configuration options} { destroy .t .x set result } {1 {A window cannot have both the -use and the -container option set.}} +test frame-2.11 {toplevel configuration options} { + # Make sure all options can be set to the default value + toplevel .f + set opts {} + foreach opt [.f configure] { + if {[llength $opt] == 5} { + lappend opts [lindex $opt 0] [lindex $opt 4] + } + } + eval toplevel .g $opts + destroy .f .g +} {} catch {destroy .t} toplevel .t -width 300 -height 150 wm geometry .t +0+0 update -set i 11 +set i 12 foreach test { {-background #ff0000 #ff0000 non-existent {unknown color name "non-existent"}} |