diff options
author | pspjuth <pspjuth@noemail.net> | 2001-05-28 16:56:02 (GMT) |
---|---|---|
committer | pspjuth <pspjuth@noemail.net> | 2001-05-28 16:56:02 (GMT) |
commit | 439e7cfa8f3d98d3b9cf727675a86ee4faa66b52 (patch) | |
tree | 72ba38f9fdbf75090cbbb9845a10c5c2b4e0d4dc /tests/frame.test | |
parent | ab95715a88f8ea24186143ba05b6c45a69d78c22 (diff) | |
download | tk-439e7cfa8f3d98d3b9cf727675a86ee4faa66b52.zip tk-439e7cfa8f3d98d3b9cf727675a86ee4faa66b52.tar.gz tk-439e7cfa8f3d98d3b9cf727675a86ee4faa66b52.tar.bz2 |
Upgraded frame to use the newer TK_OPTION
style when processing configuration options. Some cleanup of
bad comments and bad code. [part of patch #420861]
FossilOrigin-Name: 1832807b99bc1a5da1cd0ec94688656e4901cab6
Diffstat (limited to 'tests/frame.test')
-rw-r--r-- | tests/frame.test | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/tests/frame.test b/tests/frame.test index 1b28954..8f5644b 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.4 1999/12/14 06:53:13 hobbs Exp $ +# RCS: @(#) $Id: frame.test,v 1.5 2001/05/28 16:56:02 pspjuth Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -105,7 +105,7 @@ foreach test { {-highlightcolor #123456 #123456 non-existent {unknown color name "non-existent"}} {-highlightthickness 6 6 badValue {bad screen distance "badValue"}} - {-relief ridge ridge badValue {bad relief type "badValue": must be flat, groove, raised, ridge, solid, or sunken}} + {-relief ridge ridge badValue {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}} {-takefocus "any string" "any string" {} {}} {-width 32 32 badValue {bad screen distance "badValue"}} } { @@ -178,11 +178,22 @@ test frame-2.9 {toplevel configuration options} { catch {destroy .t} list [catch {toplevel .t -width 200 -height 100 -screen bogus} msg] $msg } {1 {couldn't connect to display "bogus"}} +test frame-2.10 {toplevel configuration options} { + catch {destroy .t} + catch {destroy .x} + toplevel .t -container 1 -width 300 -height 120 + wm geometry .t +0+0 + set result [list \ + [catch {toplevel .x -container 1 -use [winfo id .t]} msg] $msg] + destroy .t .x + set result +} {1 {A window cannot have both the -use and the -container option set.}} + catch {destroy .t} toplevel .t -width 300 -height 150 wm geometry .t +0+0 update -set i 8 +set i 11 foreach test { {-background #ff0000 #ff0000 non-existent {unknown color name "non-existent"}} @@ -195,17 +206,17 @@ foreach test { {-highlightcolor #123456 #123456 non-existent {unknown color name "non-existent"}} {-highlightthickness 3 3 badValue {bad screen distance "badValue"}} - {-relief ridge ridge badValue {bad relief type "badValue": must be flat, groove, raised, ridge, solid, or sunken}} + {-relief ridge ridge badValue {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}} {-width 32 32 badValue {bad screen distance "badValue"}} } { set name [lindex $test 0] - test frame-2.$i {frame configuration options} { + test frame-2.$i {toplevel configuration options} { .t configure $name [lindex $test 1] lindex [.t configure $name] 4 } [lindex $test 2] incr i if {[lindex $test 3] != ""} { - test frame-2.$i {frame configuration options} { + test frame-2.$i {toplevel configuration options} { list [catch {.t configure $name [lindex $test 3]} msg] $msg } [list 1 [lindex $test 4]] } |