summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2006-04-05 19:49:19 (GMT)
committerhobbs <hobbs@noemail.net>2006-04-05 19:49:19 (GMT)
commit90a7f1efc143f3c501c5da409a282390d23b0e38 (patch)
tree34d38aa235dc8cd0dbddbafef27d3af5571bcbf6 /tests
parente732747a64bcc8a4b3c305396b185445d7da3b4d (diff)
downloadtk-90a7f1efc143f3c501c5da409a282390d23b0e38.zip
tk-90a7f1efc143f3c501c5da409a282390d23b0e38.tar.gz
tk-90a7f1efc143f3c501c5da409a282390d23b0e38.tar.bz2
* tests/grid.test: fix segfault on empty index list
* generic/tkGrid.c (GridRowColumnConfigureCommand): [Bug 1422430] FossilOrigin-Name: 02f3657948f46623dbb71d54f9972d1a83782878
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} {