summaryrefslogtreecommitdiffstats
path: root/tests/grid.test
diff options
context:
space:
mode:
authorpspjuth <peter.spjuth@gmail.com>2004-11-07 22:00:12 (GMT)
committerpspjuth <peter.spjuth@gmail.com>2004-11-07 22:00:12 (GMT)
commitce2b25e17cc451455a42e252bebe6d79a041b49d (patch)
treecdce1b05d63cec843960d42689eb08dff535d7ef /tests/grid.test
parent547bf5ad9b134b9600676729e20a86e75a6115a7 (diff)
downloadtk-ce2b25e17cc451455a42e252bebe6d79a041b49d.zip
tk-ce2b25e17cc451455a42e252bebe6d79a041b49d.tar.gz
tk-ce2b25e17cc451455a42e252bebe6d79a041b49d.tar.bz2
Made handling of ^ a bit more consistent in
corner cases. This makes ^ work without any widgets in the same command. [Bug 962589]
Diffstat (limited to 'tests/grid.test')
-rw-r--r--tests/grid.test39
1 files changed, 37 insertions, 2 deletions
diff --git a/tests/grid.test b/tests/grid.test
index d94b762..fca981c 100644
--- a/tests/grid.test
+++ b/tests/grid.test
@@ -5,7 +5,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: grid.test,v 1.24 2004/02/18 21:25:42 pspjuth Exp $
+# RCS: @(#) $Id: grid.test,v 1.25 2004/11/07 22:00:12 pspjuth Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -164,7 +164,7 @@ grid_reset 3.2
test grid-3.3 {configure: basic argument checking} {
button .b
list [catch {grid .b -row -1} msg] $msg
-} {1 {bad grid value "-1": must be a non-negative integer}}
+} {1 {bad row value "-1": must be a non-negative integer}}
grid_reset 3.3
test grid-3.4 {configure: basic argument checking} {
@@ -952,6 +952,41 @@ test grid-11.17 {default widget placement} {
} {100 50 100}
grid_reset 11.17
+test grid-11.18 {default widget placement} {
+ foreach l {a b c d e} {
+ frame .$l -width 50 -height 50
+ }
+ grid .a .b .c .d -sticky news
+ grid ^ ^ ^ x -in . ;# ^ and no child should work with -in.
+ grid rowconfigure . {0 1} -uniform a
+ update
+ set res ""
+ lappend res [winfo height .a]
+ lappend res [winfo height .b]
+ lappend res [winfo height .c]
+ lappend res [winfo height .d]
+} {100 100 100 50}
+grid_reset 11.18
+
+test grid-11.19 {default widget placement} {
+ foreach l {a b c d e} {
+ frame .$l -width 50 -height 50
+ }
+ grid .a .b -sticky news
+ grid .c .d -sticky news
+ grid ^ -in . -row 2
+ grid x ^ -in . -row 1
+
+ grid rowconfigure . {0 1 2} -uniform a
+ update
+ set res ""
+ lappend res [winfo height .a]
+ lappend res [winfo height .b]
+ lappend res [winfo height .c]
+ lappend res [winfo height .d]
+} {50 100 100 50}
+grid_reset 11.19
+
test grid-12.1 {-sticky} {
catch {unset data}
frame .f -width 200 -height 100 -highlightthickness 0 -bg red