From cd474b4ece2ad8856cb4ee6069a1ab529d9c5e9f Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 3 Nov 2008 11:54:25 +0000 Subject: busy tests: the default wait cursor on windows is wait not watch, so added suitable constraints and cloned some tests --- ChangeLog | 1 + tests/busy.test | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 63 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3f22e50..814e269 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2008-11-03 Pat Thoyts + * tests/busy.test: default wait cursor on windows is 'wait' * win/tkWinFont.c: const fixes for the windows code. 2008-11-02 Jan Nijtmans diff --git a/tests/busy.test b/tests/busy.test index a35fb60..a402fff 100644 --- a/tests/busy.test +++ b/tests/busy.test @@ -6,7 +6,7 @@ # # Copyright (c) 1998-2000 by Jos Decoster. All rights reserved. # -# RCS: @(#) $Id: busy.test,v 1.1 2008/10/18 14:22:22 dkf Exp $ +# RCS: @(#) $Id: busy.test,v 1.2 2008/11/03 11:54:25 patthoyts Exp $ package require tcltest 2.1 tcltest::configure {*}$argv @@ -177,9 +177,11 @@ test busy-3.7 {tk busy cget unix} -setup { test busy-4.1 {tk busy configure no window} -returnCodes error -body { tk busy configure } -result {wrong # args: should be "tk busy configure window ?option? ?value ...?"} + test busy-4.2 {tk busy configure invalid window} -body { tk busy configure .f } -returnCodes error -result {bad window path name ".f"} + test busy-4.3 {tk busy configure non-busy window} -setup { pack [frame .f] } -body { @@ -187,7 +189,8 @@ test busy-4.3 {tk busy configure non-busy window} -setup { } -cleanup { destroy .f } -returnCodes error -result {can't find busy window ".f"} -test busy-4.4 {tk busy configure} -setup { + +test busy-4.4 {tk busy configure} -constraints {nonwin} -setup { pack [frame .f] tk busy hold .f update @@ -197,7 +200,19 @@ test busy-4.4 {tk busy configure} -setup { tk busy forget .f destroy .f } -result {{-cursor cursor Cursor watch watch}} -test busy-4.5 {tk busy configure} -setup { + +test busy-4.4-win {tk busy configure} -constraints {win} -setup { + pack [frame .f] + tk busy hold .f + update +} -body { + tk busy configure .f +} -cleanup { + tk busy forget .f + destroy .f +} -result {{-cursor cursor Cursor wait wait}} + +test busy-4.5 {tk busy configure} -constraints {nonwin tempNotMac} -setup { pack [frame .f] tk busy hold .f -cursor hand2 update @@ -206,7 +221,19 @@ test busy-4.5 {tk busy configure} -setup { } -cleanup { tk busy forget .f destroy .f -} -result {{-cursor cursor Cursor watch hand2}} -constraints tempNotMac +} -result {{-cursor cursor Cursor watch hand2}} + +test busy-4.5-win {tk busy configure} -constraints win -setup { + pack [frame .f] + tk busy hold .f -cursor hand2 + update +} -body { + tk busy configure .f +} -cleanup { + tk busy forget .f + destroy .f +} -result {{-cursor cursor Cursor wait hand2}} + test busy-4.6 {tk busy configure invalid option} -setup { pack [frame .f] tk busy hold .f @@ -217,7 +244,8 @@ test busy-4.6 {tk busy configure invalid option} -setup { tk busy forget .f destroy .f } -returnCodes error -result {unknown option "-invalidOption"} -test busy-4.7 {tk busy configure valid option} -setup { + +test busy-4.7 {tk busy configure valid option} -constraints {nonwin} -setup { pack [frame .f] tk busy hold .f update @@ -227,7 +255,21 @@ test busy-4.7 {tk busy configure valid option} -setup { tk busy forget .f destroy .f } -result {-cursor cursor Cursor watch watch} -test busy-4.8 {tk busy configure valid option} -setup { + +test busy-4.7-win {tk busy configure valid option} -constraints {win} -setup { + pack [frame .f] + tk busy hold .f + update +} -body { + tk busy configure .f -cursor +} -cleanup { + tk busy forget .f + destroy .f +} -result {-cursor cursor Cursor wait wait} + +test busy-4.8 {tk busy configure valid option} -constraints { + nonwin tempNotMac +} -setup { pack [frame .f] tk busy hold .f -cursor circle update @@ -236,7 +278,19 @@ test busy-4.8 {tk busy configure valid option} -setup { } -cleanup { tk busy forget .f destroy .f -} -result {-cursor cursor Cursor watch circle} -constraints tempNotMac +} -result {-cursor cursor Cursor watch circle} + +test busy-4.8-win {tk busy configure valid option} -constraints win -setup { + pack [frame .f] + tk busy hold .f -cursor circle + update +} -body { + tk busy configure .f -cursor +} -cleanup { + tk busy forget .f + destroy .f +} -result {-cursor cursor Cursor wait circle} + test busy-4.9 {tk busy configure valid option with value} -setup { pack [frame .f] tk busy hold .f @@ -248,6 +302,7 @@ test busy-4.9 {tk busy configure valid option with value} -setup { tk busy forget .f destroy .f } -result {pencil} -constraints tempNotMac + test busy-4.10 {tk busy configure valid option with invalid value} -setup { pack [frame .f] tk busy hold .f -- cgit v0.12