summaryrefslogtreecommitdiffstats
path: root/tests/grid.test
diff options
context:
space:
mode:
authorericm <ericm>2000-01-20 23:46:20 (GMT)
committerericm <ericm>2000-01-20 23:46:20 (GMT)
commit08776342a8dd10c3f9f3cbba8655a1e4abbafafc (patch)
treea64375903efa812908da558697622cf750421827 /tests/grid.test
parent028293934889d9f696d2315b98e902adb757bd68 (diff)
downloadtk-08776342a8dd10c3f9f3cbba8655a1e4abbafafc.zip
tk-08776342a8dd10c3f9f3cbba8655a1e4abbafafc.tar.gz
tk-08776342a8dd10c3f9f3cbba8655a1e4abbafafc.tar.bz2
* tests/grid.test: Added a test for the consecutive ^ and multiple
widget case (bug #1386). * generic/tkGrid.c: Fixed interpretation of consecutive ^ characters in grid command. Previously, ^ ^ was interpreted as meaning that there must be a 2-column widget above to extend, neglecting the case where there was actually 2 1-column widgets above. Now, ^ ^ is interpreted as a possible width; the gridder will consume as many ^'s as there are columns in the widget, and leave the rest for the extension of other widgets. (bug #1386).
Diffstat (limited to 'tests/grid.test')
-rw-r--r--tests/grid.test18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/grid.test b/tests/grid.test
index bff0bfa..d80f1a9 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.6 1999/11/13 01:23:01 wart Exp $
+# RCS: @(#) $Id: grid.test,v 1.7 2000/01/20 23:46:21 ericm Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -784,6 +784,22 @@ test grid-11.14 {default widget placement} {
} {{0,25 50,50} {50,0 50,50} {50,50 50,50}}
grid_reset 11.14
+test grid-11.15 {^ ^ test with multiple windows} {
+ foreach i {1 2 3 4} {
+ frame .f$i -width 50 -height 50 -bd 1 -relief solid
+ }
+ grid .f1 .f2 .f3 -sticky ns
+ grid .f4 ^ ^
+ update
+ set a ""
+ foreach i {1 2 3 4} {
+ lappend a "[winfo x .f$i],[winfo y .f$i]\
+ [winfo width .f$i],[winfo height .f$i]"
+ }
+ set a
+} {{0,0 50,50} {50,0 50,100} {100,0 50,100} {0,50 50,50}}
+grid_reset 11.15
+
test grid-12.1 {-sticky} {
catch {unset data}
frame .f -width 200 -height 100 -highlightthickness 0 -bg red