summaryrefslogtreecommitdiffstats
path: root/tests/grid.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-04-05 20:54:57 (GMT)
committerhobbs <hobbs>2006-04-05 20:54:57 (GMT)
commit636d1fed7fa814e48effbb3957c30157b559069b (patch)
tree87b817c26e91bf9f461be17eef696a844d18f48a /tests/grid.test
parent45487b682e8ca5a466d577fbf600b40f7962d281 (diff)
downloadtk-636d1fed7fa814e48effbb3957c30157b559069b.zip
tk-636d1fed7fa814e48effbb3957c30157b559069b.tar.gz
tk-636d1fed7fa814e48effbb3957c30157b559069b.tar.bz2
* tests/grid.test: fix segfault on empty or "all" index list
* generic/tkGrid.c (GridRowColumnConfigureCommand): [Bug 1422430]
Diffstat (limited to 'tests/grid.test')
-rw-r--r--tests/grid.test32
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/grid.test b/tests/grid.test
index 0428eb4..c58d442 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.26 2005/04/03 15:21:49 pspjuth Exp $
+# RCS: @(#) $Id: grid.test,v 1.27 2006/04/05 20:54:57 hobbs Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -751,6 +751,36 @@ test grid-10.26 {column/row configure} {
} {-minsize 0 -pad 0 -uniform {} -weight 0}
grid_reset 10.26
+test grid-10.30 {column/row configure - no indices} {
+ # Bug 1422430
+ set t [toplevel .test]
+ set res [list [catch {grid columnconfigure $t "" -weight 1} msg] $msg]
+ destroy $t
+ set res
+} {1 {no column indices specified}}
+
+test grid-10.31 {column/row configure - no indices} {
+ set t [toplevel .test]
+ set res [list [catch {grid rowconfigure $t "" -weight 1} msg] $msg]
+ destroy $t
+ set res
+} {1 {no row indices specified}}
+
+test grid-10.32 {column/row configure - invalid indices} {
+ list [catch {grid columnconfigure . {0 1 2} -weight} msg] $msg
+} {1 {grid columnconfigure: must specify a single element on retrieval}}
+
+test grid-10.33 {column/row configure - invalid indices} {
+ list [catch {grid rowconfigure . {0 1 2} -weight} msg] $msg
+} {1 {grid rowconfigure: must specify a single element on retrieval}}
+
+test grid-10.34 {column/row configure - empty 'all' configure} {
+ # Bug 1422430
+ set t [toplevel .test]
+ grid rowconfigure $t all -weight 1
+ destroy $t
+} {}
+
# auto-placement tests
test grid-11.1 {default widget placement} {