summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-04-05 19:49:20 (GMT)
committerhobbs <hobbs>2006-04-05 19:49:20 (GMT)
commit132b87da52bb34dc4fae94a0ce18681799b4d0f6 (patch)
tree34d38aa235dc8cd0dbddbafef27d3af5571bcbf6 /tests
parentb7cd26f9bfcecfda81f52a40c7d27526991c925d (diff)
downloadtk-132b87da52bb34dc4fae94a0ce18681799b4d0f6.zip
tk-132b87da52bb34dc4fae94a0ce18681799b4d0f6.tar.gz
tk-132b87da52bb34dc4fae94a0ce18681799b4d0f6.tar.bz2
* tests/grid.test: fix segfault on empty index list
* generic/tkGrid.c (GridRowColumnConfigureCommand): [Bug 1422430]
Diffstat (limited to 'tests')
-rw-r--r--tests/grid.test25
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/grid.test b/tests/grid.test
index 50064e3..1e07028 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.17.2.1 2004/02/18 20:10:34 pspjuth Exp $
+# RCS: @(#) $Id: grid.test,v 1.17.2.2 2006/04/05 19:49:20 hobbs Exp $
package require tcltest 2.1
namespace import -force tcltest::configure
@@ -690,6 +690,29 @@ test grid-10.20 {column/row configure} {
} {foo}
grid_reset 10.20
+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}}
+
# auto-placement tests
test grid-11.1 {default widget placement} {