From 6fb3a6d3efe6a53910a30154df8efadf64546cdc Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 8 Oct 2008 18:57:47 +0000 Subject: * tests/scrollbar.test: Revised testing of the cget subcommand so that it tests consistency with the configure subcommand and not agreement with a hardcoded value that will change as tastes in GUIs evolve. * unix/tkUnixWm.c: Restored consistency of error messages from * macosx/tkMacOSXWm.c: [wm iconphoto] with the test suite and across * tests/unixWm.test: all platforms. [Bug 2021443] --- ChangeLog | 7 ++++++- tests/scrollbar.test | 38 +++++++++++++++++++------------------- tests/unixWm.test | 4 ++-- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9d97cea..8f0686e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,17 @@ 2008-10-08 Don Porter + * tests/scrollbar.test: Revised testing of the cget subcommand so + that it tests consistency with the configure subcommand and not + agreement with a hardcoded value that will change as tastes in + GUIs evolve. + * tests/canvText.test (canText-17.1): Update expected result to match revised PostScript output due to more predictable formatting of floating point values. * unix/tkUnixWm.c: Restored consistency of error messages from * macosx/tkMacOSXWm.c: [wm iconphoto] with the test suite and across - all platforms. [Bug 2021443] + * tests/unixWm.test: all platforms. [Bug 2021443] 2008-10-07 Pat Thoyts diff --git a/tests/scrollbar.test b/tests/scrollbar.test index 33fd592..1ba79db 100644 --- a/tests/scrollbar.test +++ b/tests/scrollbar.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: scrollbar.test,v 1.22 2008/10/06 23:42:58 patthoyts Exp $ +# RCS: @(#) $Id: scrollbar.test,v 1.23 2008/10/08 18:57:47 dgp Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -163,24 +163,24 @@ test scrollbar-3.10 {ScrollbarWidgetCmd procedure, "cget" option} { list [catch {.s cget -orient} msg] $msg } {0 vertical} scrollbar .s2 -test scrollbar-3.11 {ScrollbarWidgetCmd procedure, "cget" option} win { - list [catch {.s2 cget -bd} msg] $msg -} {0 0} -test scrollbar-3.12 {ScrollbarWidgetCmd procedure, "cget" option} {unix notAqua} { - list [catch {.s2 cget -bd} msg] $msg -} {0 2} -test scrollbar-3.12.1 {ScrollbarWidgetCmd procedure, "cget" option} aqua { - list [catch {.s2 cget -bd} msg] $msg -} {0 0} -test scrollbar-3.13 {ScrollbarWidgetCmd procedure, "cget" option} win { - list [catch {.s2 cget -highlightthickness} msg] $msg -} {0 0} -test scrollbar-3.14 {ScrollbarWidgetCmd procedure, "cget" option} {unix notAqua} { - list [catch {.s2 cget -highlightthickness} msg] $msg -} {0 0} -test scrollbar-3.14.1 {ScrollbarWidgetCmd procedure, "cget" option} aqua { - list [catch {.s2 cget -highlightthickness} msg] $msg -} {0 0} +test scrollbar-3.11 {ScrollbarWidgetCmd procedure, "cget" option} { + expr {[.s2 cget -bd] == [lindex [.s2 configure -bd] 3]} +} 1 +test scrollbar-3.12 {ScrollbarWidgetCmd procedure, "cget" option} emptyTest { + # empty test; duplicated scrollbar-3.11 +} {} +test scrollbar-3.12.1 {ScrollbarWidgetCmd procedure, "cget" option} emptyTest { + # empty test; duplicated scrollbar-3.11 +} {} +test scrollbar-3.13 {ScrollbarWidgetCmd procedure, "cget" option} { + expr {[.s2 cget -highlightthickness] == [lindex [.s2 configure -highlightthickness] 3]} +} 1 +test scrollbar-3.14 {ScrollbarWidgetCmd procedure, "cget" option} emptyTest { + # empty test; duplicated scrollbar-3.13 +} {} +test scrollbar-3.14.1 {ScrollbarWidgetCmd procedure, "cget" option} emptyTest { + # empty test; duplicated scrollbar-3.13 +} {} destroy .s2 test scrollbar-3.15 {ScrollbarWidgetCmd procedure, "configure" option} { llength [.s configure] diff --git a/tests/unixWm.test b/tests/unixWm.test index 2c7a781..c55578b 100644 --- a/tests/unixWm.test +++ b/tests/unixWm.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: unixWm.test,v 1.45 2008/07/23 23:24:25 nijtmans Exp $ +# RCS: @(#) $Id: unixWm.test,v 1.46 2008/10/08 18:57:47 dgp Exp $ package require tcltest 2.2 eval tcltest::configure $argv @@ -2475,7 +2475,7 @@ test unixWm-60.5 {wm attributes - bad attribute} -constraints unix -body { test unixWm-61.1 {Tk_WmCmd procedure, "iconphoto" option} unix { list [catch {wm iconph .} msg] $msg -} {1 {wrong # args: should be "wm iconphoto window ?-default? image ?image ...?"}} +} {1 {wrong # args: should be "wm iconphoto window ?-default? image1 ?image2 ...?"}} test unixWm-61.2 {Tk_WmCmd procedure, "iconphoto" option} unix { destroy .t toplevel .t -- cgit v0.12