summaryrefslogtreecommitdiffstats
path: root/tests/canvas.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-07-24 19:41:38 (GMT)
committerhobbs <hobbs>2002-07-24 19:41:38 (GMT)
commit258a9aa3872b8f0556f1cc7802f996e9f340a69d (patch)
treef644f0080bd787e86516f776d01d009597b46a0e /tests/canvas.test
parentd25a5da28b653367b692c8dff3e157acfc03d65f (diff)
downloadtk-258a9aa3872b8f0556f1cc7802f996e9f340a69d.zip
tk-258a9aa3872b8f0556f1cc7802f996e9f340a69d.tar.gz
tk-258a9aa3872b8f0556f1cc7802f996e9f340a69d.tar.bz2
* tests/canvas.test: added canvas-14.[1-6]
* generic/tkCanvas.c (CanvasWidgetCmd): corrected handling of 'scan' subcommand args. Also removed early return cases to goto done instead where the canvasPtr would be Tcl_Release'd. This may solve other problems with unreleased canvasPtr's. [Bug #581560]
Diffstat (limited to 'tests/canvas.test')
-rw-r--r--tests/canvas.test29
1 files changed, 28 insertions, 1 deletions
diff --git a/tests/canvas.test b/tests/canvas.test
index 84e7c62..d8df53a 100644
--- a/tests/canvas.test
+++ b/tests/canvas.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-2000 Ajuba Solutions.
# All rights reserved.
#
-# RCS: @(#) $Id: canvas.test,v 1.14 2002/07/14 05:48:46 dgp Exp $
+# RCS: @(#) $Id: canvas.test,v 1.15 2002/07/24 19:41:38 hobbs Exp $
package require tcltest 2.1
namespace import -force tcltest::configure
@@ -427,6 +427,33 @@ test canvas-13.1 {canvas delete during event, SF bug-228024} {
set ::x
} okokokokokokokokokokokokokokokokokokokokokokokokokokokokokok
+test canvas-14.1 {canvas scan SF bug 581560} {
+ destroy .c; canvas .c
+ list [catch {.c scan} msg] $msg
+} {1 {wrong # args: should be ".c scan mark|dragto x y ?dragGain?"}}
+test canvas-14.2 {canvas scan} {
+ destroy .c; canvas .c
+ list [catch {.c scan bogus} msg] $msg
+} {1 {wrong # args: should be ".c scan mark|dragto x y ?dragGain?"}}
+test canvas-14.3 {canvas scan} {
+ destroy .c; canvas .c
+ list [catch {.c scan mark} msg] $msg
+} {1 {wrong # args: should be ".c scan mark|dragto x y ?dragGain?"}}
+test canvas-14.4 {canvas scan} {
+ destroy .c; canvas .c
+ list [catch {.c scan mark 10 10} msg] $msg
+} {0 {}}
+test canvas-14.5 {canvas scan} {
+ destroy .c; canvas .c
+ list [catch {.c scan mark 10 10 5} msg] $msg
+} {1 {wrong # args: should be ".c scan mark x y"}}
+test canvas-14.6 {canvas scan} {
+ destroy .c; canvas .c
+ list [catch {.c scan dragto 10 10 5} msg] $msg
+} {0 {}}
+
+destroy .c
+
# cleanup
::tcltest::cleanupTests
return