summaryrefslogtreecommitdiffstats
path: root/tests/grid.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/grid.test')
-rw-r--r--tests/grid.test47
1 files changed, 28 insertions, 19 deletions
diff --git a/tests/grid.test b/tests/grid.test
index 61cc661..85464d7 100644
--- a/tests/grid.test
+++ b/tests/grid.test
@@ -2,29 +2,16 @@
# of Tk. It is (almost) organized in the standard fashion for Tcl tests.
#
# Copyright (c) 1996 Sun Microsystems, Inc.
+# Copyright (c) 1998-1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: grid.test,v 1.2 1998/09/14 18:23:47 stanton Exp $
+# RCS: @(#) $Id: grid.test,v 1.3 1999/01/06 21:10:46 stanton Exp $
if {[string compare test [info procs test]] == 1} then \
{source ../tests/defs}
-# Test Arguments:
-# name - Name of test, in the form foo-1.2.
-# description - Short textual description of the test, to
-# help humans understand what it does.
-# constraints - A list of one or more keywords, each of
-# which must be the name of an element in
-# the array "testConfig". If any of these
-# elements is zero, the test is skipped.
-# This argument may be omitted.
-# script - Script to run to carry out the test. It must
-# return a result that can be checked for
-# correctness.
-# answer - Expected result from script.
-
# helper routine to return "." to a sane state after a test
# The variable GRID_VERBOSE can be used to "look" at the result
# of one or all of the tests
@@ -310,18 +297,18 @@ test grid-6.7 {location (y)} {
grid_reset 6.7
test grid-6.8 {location (weights)} {
- frame .f -width 200 -height 100 -highlightthickness 0 -bg red
+ frame .f -width 300 -height 100 -highlightthickness 0 -bg red
frame .a
grid .a
grid .f -in .a
grid rowconfigure .f 0 -weight 1
grid columnconfigure .f 0 -weight 1
grid propagate .a 0
- .a configure -width 110 -height 15
+ .a configure -width 200 -height 15
update
set got ""
set result ""
- for {set y -10} { $y < 120} { incr y} {
+ for {set y -10} { $y < 210} { incr y} {
set a [grid location . $y $y]
if {$a != $got} {
lappend result $y->$a
@@ -329,7 +316,7 @@ test grid-6.8 {location (weights)} {
}
}
set result
-} {{-10->-1 -1} {0->0 0} {16->0 1} {111->1 1}}
+} {{-10->-1 -1} {0->0 0} {16->0 1} {201->1 1}}
grid_reset 6.8
test grid-6.9 {location: check updates pending} {
@@ -1203,3 +1190,25 @@ test grid-16.8 {layout internal constraints} {
}
set a
} {0 30 70 250 280 , 0 30 130 230 260 , 0 30 113 197 280 , 0 30 60 90 120 }
+
+test grid-17.1 {forget and pending idle handlers} {
+ # This test is intended to detect a crash caused by a failure to remove
+ # pending idle handlers when grid forget is invoked.
+
+ toplevel .t
+ frame .t.f
+ label .t.f.l -text foobar
+ grid .t.f.l
+ grid .t.f
+ update
+ grid forget .t.f.l
+ grid forget .t.f
+ destroy .t
+
+ toplevel .t
+ frame .t.f
+ label .t.f.l -text foobar
+ grid .t.f.l
+ destroy .t
+ set result ok
+} ok