summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-06-19 23:17:17 (GMT)
committerhobbs <hobbs>2002-06-19 23:17:17 (GMT)
commitd7baa5e4634cbff79d27254ec6aaf39932fe0a6d (patch)
tree0ae4a8e189181d594a99d5d82ed044e382de5de4 /tests
parent4c835938a6d9c14fb14dbea95ed9bc7a150aa3f7 (diff)
downloadtk-d7baa5e4634cbff79d27254ec6aaf39932fe0a6d.zip
tk-d7baa5e4634cbff79d27254ec6aaf39932fe0a6d.tar.gz
tk-d7baa5e4634cbff79d27254ec6aaf39932fe0a6d.tar.bz2
* tests/panedwindow.test:
* generic/tkPanedWindow.c: ensure that sash index is lower bounds checked. [Bug #548727]
Diffstat (limited to 'tests')
-rw-r--r--tests/panedwindow.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/panedwindow.test b/tests/panedwindow.test
index 0177231..3a88c18 100644
--- a/tests/panedwindow.test
+++ b/tests/panedwindow.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: panedwindow.test,v 1.1 2002/02/22 02:41:17 hobbs Exp $
+# RCS: @(#) $Id: panedwindow.test,v 1.2 2002/06/19 23:17:17 hobbs Exp $
if {[info tclversion] < 8.4} {
puts "panedwindow requires Tk 8.4"
@@ -241,6 +241,27 @@ test panedwindow-6.7 {sash coord subcommand, sashes correctly placed} {
destroy .p .p.f .p.f2 .p.f3
set result
} [list 0 50]
+test panedwindow-6.8 {sash coord subcommand, errors} {
+ panedwindow .p
+ set result [list \
+ [catch {.p sash coord -1} msg] $msg \
+ [catch {.p sash coord 0} msg] $msg \
+ [catch {.p sash coord 1} msg] $msg \
+ ]
+ destroy .p
+ set result
+} [list 1 "invalid sash index" 1 "invalid sash index" 1 "invalid sash index"]
+test panedwindow-6.9 {sash coord subcommand, errors} {
+ panedwindow .p
+ .p add [frame .p.f]
+ set result [list \
+ [catch {.p sash coord -1} msg] $msg \
+ [catch {.p sash coord 0} msg] \
+ [catch {.p sash coord 1} msg] $msg \
+ ]
+ destroy .p
+ set result
+} [list 1 "invalid sash index" 0 1 "invalid sash index"]
test panedwindow-8.1 {sash mark subcommand, errors} {
panedwindow .p