diff options
author | hobbs <hobbs> | 2006-04-05 19:49:20 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2006-04-05 19:49:20 (GMT) |
commit | 7119ca14f8503ca65aac739bb97226304173a08f (patch) | |
tree | 34d38aa235dc8cd0dbddbafef27d3af5571bcbf6 /tests/grid.test | |
parent | f88e67c4c39b7758bad240fdb655bbf5b8d21628 (diff) | |
download | tk-7119ca14f8503ca65aac739bb97226304173a08f.zip tk-7119ca14f8503ca65aac739bb97226304173a08f.tar.gz tk-7119ca14f8503ca65aac739bb97226304173a08f.tar.bz2 |
* tests/grid.test: fix segfault on empty index list
* generic/tkGrid.c (GridRowColumnConfigureCommand): [Bug 1422430]
Diffstat (limited to 'tests/grid.test')
-rw-r--r-- | tests/grid.test | 25 |
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} { |