diff options
author | hobbs <hobbs> | 2002-06-17 20:09:01 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-06-17 20:09:01 (GMT) |
commit | 25f604e4d2e56721809b177202db73a38df2491e (patch) | |
tree | 2526b5918abac20b6e67ff9f285600bd7cf3d3f4 /tests/tk.test | |
parent | a984d974f6b3123815d8116428afe8e51e025f31 (diff) | |
download | tk-25f604e4d2e56721809b177202db73a38df2491e.zip tk-25f604e4d2e56721809b177202db73a38df2491e.tar.gz tk-25f604e4d2e56721809b177202db73a38df2491e.tar.bz2 |
* generic/tkCmds.c (Tk_TkObjCmd):
* generic/tkInt.h (struct TkCaret):
* mac/tkMacXStubs.c (Tk_SetCaretPos):
* unix/tkUnixKey.c (TkpGetString, Tk_SetCaretPos):
* win/tkWinX.c (Tk_SetCaretPos):
* tests/tk.test: Added 'tk caret' implementation of TIP#96
* doc/SetCaret.3 (new): which adds a TkCaret structure element to
* doc/tk.n: TkDisplay for maintaining state.
Diffstat (limited to 'tests/tk.test')
-rw-r--r-- | tests/tk.test | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/tests/tk.test b/tests/tk.test index a48716a..d9e8baa 100644 --- a/tests/tk.test +++ b/tests/tk.test @@ -3,9 +3,9 @@ # # Copyright (c) 1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. -# All rights reserved. +# Copyright (c) 2002 ActiveState Corporation. # -# RCS: @(#) $Id: tk.test,v 1.5 2000/10/31 00:52:11 hobbs Exp $ +# RCS: @(#) $Id: tk.test,v 1.6 2002/06/17 20:09:01 hobbs Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -16,7 +16,7 @@ test tk-1.1 {tk command: general} { } {1 {wrong # args: should be "tk option ?arg?"}} test tk-1.2 {tk command: general} { list [catch {tk xyz} msg] $msg -} {1 {bad option "xyz": must be appname, scaling, or useinputmethods}} +} {1 {bad option "xyz": must be appname, caret, scaling, or useinputmethods}} set appname [tk appname] test tk-2.1 {tk command: appname} { @@ -110,6 +110,25 @@ test tk-4.7 {tk command: useinputmethods: set new} {macOrPc} { } 0 tk useinputmethods $useim +test tk-5.1 {tk caret} { + list [catch {tk caret} msg] $msg +} {1 {wrong # args: should be "tk caret window ?-x x? ?-y y? ?-height height?"}} +test tk-5.2 {tk caret} { + list [catch {tk caret bogus} msg] $msg +} {1 {bad window path name "bogus"}} +test tk-5.3 {tk caret} { + list [catch {tk caret . -foo} msg] $msg +} {1 {bad caret option "-foo": must be -x, -y, or -height}} +test tk-5.4 {tk caret} { + list [catch {tk caret . -x 0 -y} msg] $msg +} {1 {wrong # args: should be "tk caret window ?-x x? ?-y y? ?-height height?"}} +test tk-5.5 {tk caret} { + list [catch {tk caret . -x 10 -y 11 -h 12; tk caret .} msg] $msg +} {0 {-height 12 -x 10 -y 11}} +test tk-5.6 {tk caret} { + list [catch {tk caret . -x 20 -y 25 -h 30; tk caret . -hei} msg] $msg +} {0 30} + # cleanup ::tcltest::cleanupTests return |