summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorericm <ericm@noemail.net>2000-01-20 23:46:19 (GMT)
committerericm <ericm@noemail.net>2000-01-20 23:46:19 (GMT)
commitce10cfb1eb9ce9429123575e2ba0623d75e36d38 (patch)
treea64375903efa812908da558697622cf750421827 /tests
parenta132c6b0688d7632096124799de71fc9f0941792 (diff)
downloadtk-ce10cfb1eb9ce9429123575e2ba0623d75e36d38.zip
tk-ce10cfb1eb9ce9429123575e2ba0623d75e36d38.tar.gz
tk-ce10cfb1eb9ce9429123575e2ba0623d75e36d38.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). FossilOrigin-Name: c360352e669e2b1a89b4ae382503c8712bcef853
Diffstat (limited to 'tests')
-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