summaryrefslogtreecommitdiffstats
path: root/tests/cursor.test
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2004-01-28 23:36:55 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2004-01-28 23:36:55 (GMT)
commit9b95eacd124700b0b7bf9a0a1e69bb1fb7e079c5 (patch)
tree00f31e45b0f01dbec486393ac5ea1466f319c23d /tests/cursor.test
parentfe51b7b0dda07cc288a94d651f877ea1179f1610 (diff)
downloadtk-9b95eacd124700b0b7bf9a0a1e69bb1fb7e079c5.zip
tk-9b95eacd124700b0b7bf9a0a1e69bb1fb7e079c5.tar.gz
tk-9b95eacd124700b0b7bf9a0a1e69bb1fb7e079c5.tar.bz2
Backported fix for bug #776646 which makes hand2 and fleur native on windows.
Diffstat (limited to 'tests/cursor.test')
-rw-r--r--tests/cursor.test153
1 files changed, 152 insertions, 1 deletions
diff --git a/tests/cursor.test b/tests/cursor.test
index 054fb0d..65d9309 100644
--- a/tests/cursor.test
+++ b/tests/cursor.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: cursor.test,v 1.8 2002/09/03 00:22:37 hobbs Exp $
+# RCS: @(#) $Id: cursor.test,v 1.8.2.1 2004/01/28 23:37:23 patthoyts Exp $
package require tcltest 2.1
namespace import -force tcltest::configure
@@ -132,6 +132,157 @@ test cursor-4.1 {FreeCursorObjProc} {testcursor} {
set result
} {{{1 3}} {{1 2}} {{1 1}} {}}
+# -------------------------------------------------------------------------
+
+test cursor-5.1 {assert consistent cursor configuration command} \
+ -setup { button .b } \
+ -body {
+ list [catch {.b configure -cursor {watch red black}} msg] $msg
+ } \
+ -cleanup {destroy .b} \
+ -result {0 {}}
+
+# -------------------------------------------------------------------------
+# Check for the standard set of cursors.
+
+set n 0
+foreach cursor {
+ X_cursor
+ arrow
+ based_arrow_down
+ based_arrow_up
+ boat
+ bogosity
+ bottom_left_corner
+ bottom_right_corner
+ bottom_side
+ bottom_tee
+ box_spiral
+ center_ptr
+ circle
+ clock
+ coffee_mug
+ cross
+ cross_reverse
+ crosshair
+ diamond_cross
+ dot
+ dotbox
+ double_arrow
+ draft_large
+ draft_small
+ draped_box
+ exchange
+ fleur
+ gobbler
+ gumby
+ hand1
+ hand2
+ heart
+ icon
+ iron_cross
+ left_ptr
+ left_side
+ left_tee
+ leftbutton
+ ll_angle
+ lr_angle
+ man
+ middlebutton
+ mouse
+ pencil
+ pirate
+ plus
+ question_arrow
+ right_ptr
+ right_side
+ right_tee
+ rightbutton
+ rtl_logo
+ sailboat
+ sb_down_arrow
+ sb_h_double_arrow
+ sb_left_arrow
+ sb_right_arrow
+ sb_up_arrow
+ sb_v_double_arrow
+ shuttle
+ sizing
+ spider
+ spraycan
+ star
+ target
+ tcross
+ top_left_arrow
+ top_left_corner
+ top_right_corner
+ top_side
+ top_tee
+ trek
+ ul_angle
+ umbrella
+ ur_angle
+ watch
+ xterm
+} {
+ test cursor-6.$n {check cursor $cursor} \
+ -setup {button .b -text $cursor} \
+ -body {
+ list [catch {.b configure -cursor $cursor} msg] $msg
+ } \
+ -cleanup {destroy .b} \
+ -result {0 {}}
+ incr n
+}
+unset n
+
+# -------------------------------------------------------------------------
+# Check the Windows specific cursors
+set n 0
+foreach cursor {
+ no
+ starting
+ size
+ size_ne_sw
+ size_ns
+ size_nw_se
+ size_we
+ uparrow
+ wait
+} {
+ test cursor-7.$n {check cursor $cursor} \
+ -constraints {pcOnly} \
+ -setup {button .b -text $cursor} \
+ -body {
+ list [catch {.b configure -cursor $cursor} msg] $msg
+ } \
+ -cleanup {destroy .b} \
+ -result {0 {}}
+ incr n
+}
+unset n
+
+# -------------------------------------------------------------------------
+# Check the Mac specific cursors
+set n 0
+foreach cursor {
+ text
+ cross-hair
+} {
+ test cursor-8.$n {check cursor $cursor} \
+ -constraints {macOnly} \
+ -setup {button .b -text $cursor} \
+ -body {
+ list [catch {.b configure -cursor $cursor} msg] $msg
+ } \
+ -cleanup {destroy .b} \
+ -result {0 {}}
+ incr n
+}
+unset n
+
+# -------------------------------------------------------------------------
+
destroy .t
# cleanup