summaryrefslogtreecommitdiffstats
path: root/tests/scale.test
diff options
context:
space:
mode:
authorstanton <stanton>1999-04-16 01:51:06 (GMT)
committerstanton <stanton>1999-04-16 01:51:06 (GMT)
commit03656f44f81469f459031fa3a4a7b09c8bc77712 (patch)
tree31378e81bd58f8c726fc552d6b30cbf3ca07497b /tests/scale.test
parent404fc236f34304df53b7e44bc7971d786b87d453 (diff)
downloadtk-03656f44f81469f459031fa3a4a7b09c8bc77712.zip
tk-03656f44f81469f459031fa3a4a7b09c8bc77712.tar.gz
tk-03656f44f81469f459031fa3a4a7b09c8bc77712.tar.bz2
* Merged 8.1 branch into the main trunk
Diffstat (limited to 'tests/scale.test')
-rw-r--r--tests/scale.test50
1 files changed, 33 insertions, 17 deletions
diff --git a/tests/scale.test b/tests/scale.test
index adc50e9..01b1609 100644
--- a/tests/scale.test
+++ b/tests/scale.test
@@ -3,14 +3,13 @@
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# Copyright (c) 1998-1999 by Scriptics Corporation.
+# All rights reserved.
#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: scale.test,v 1.3 1998/11/03 02:06:43 stanton Exp $
+# RCS: @(#) $Id: scale.test,v 1.4 1999/04/16 01:51:40 stanton Exp $
-if {[info procs test] != "test"} {
- source defs
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
}
foreach i [winfo children .] {
@@ -56,18 +55,18 @@ foreach test {
{-label "Some text" {Some text} {} {}}
{-length 130 130 badValue {bad screen distance "badValue"}}
{-orient horizontal horizontal badValue
- {bad orientation "badValue": must be vertical or horizontal}}
+ {bad orient "badValue": must be horizontal or vertical}}
{-orient horizontal horizontal {} {}}
- {-relief ridge ridge badValue {bad relief type "badValue": must be flat, groove, raised, ridge, solid, or sunken}}
+ {-relief ridge ridge badValue {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}}
{-repeatdelay 14 14 bogus {expected integer but got "bogus"}}
{-repeatinterval 14 14 bogus {expected integer but got "bogus"}}
{-resolution 2.0 2.0 badValue
{expected floating-point number but got "badValue"}}
{-showvalue 0 0 badValue {expected boolean value but got "badValue"}}
{-sliderlength 86 86 badValue {bad screen distance "badValue"}}
- {-sliderrelief raised raised badValue {bad relief type "badValue": must be flat, groove, raised, ridge, solid, or sunken}}
+ {-sliderrelief raised raised badValue {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}}
{-state disabled disabled badValue
- {bad state value "badValue": must be normal, active, or disabled}}
+ {bad state "badValue": must be active, disabled, or normal}}
{-state normal normal {} {}}
{-takefocus "any string" "any string" {} {}}
{-tickinterval 4.3 4.0 badValue
@@ -212,10 +211,10 @@ test scale-3.29 {ScaleWidgetCmd procedure} {
} {1 {bad option "dumb": must be cget, configure, coords, get, identify, or set}}
test scale-3.30 {ScaleWidgetCmd procedure} {
list [catch {.s c} msg] $msg
-} {1 {bad option "c": must be cget, configure, coords, get, identify, or set}}
+} {1 {ambiguous option "c": must be cget, configure, coords, get, identify, or set}}
test scale-3.31 {ScaleWidgetCmd procedure} {
list [catch {.s co} msg] $msg
-} {1 {bad option "co": must be cget, configure, coords, get, identify, or set}}
+} {1 {ambiguous option "co": must be cget, configure, coords, get, identify, or set}}
test scale-3.32 {ScaleWidgetCmd procedure, Tk_Preserve} {
proc kill args {
destroy .s
@@ -270,7 +269,7 @@ test scale-5.4 {ConfigureScale procedure} {
catch {destroy .s}
scale .s -from 0 -to 100
list [catch {.s configure -orient dumb} msg] $msg
-} {1 {bad orientation "dumb": must be vertical or horizontal}}
+} {1 {bad orient "dumb": must be horizontal or vertical}}
test scale-5.5 {ConfigureScale procedure} {
catch {destroy .s}
scale .s -from 1.11 -to 1.89 -resolution .1 -tickinterval .76
@@ -288,7 +287,7 @@ test scale-5.6 {ConfigureScale procedure} {
test scale-5.7 {ConfigureScale procedure} {
catch {destroy .s}
list [catch {scale .s -from 0 -to 100 -state bogus} msg] $msg
-} {1 {bad state value "bogus": must be normal, active, or disabled}}
+} {1 {bad state "bogus": must be active, disabled, or normal}}
catch {destroy .s}
scale .s -orient horizontal -length 200
@@ -360,7 +359,7 @@ test scale-6.13 {ComputeFormat procedure} {
.s configure -from .000001 -to .00001 -resolution .000001
.s set .000006
expr {[.s get] == 6.0e-06}
-} 1
+} {1}
test scale-6.14 {ComputeFormat procedure} {
.s configure -to .00001 -from .0001 -resolution .00001
.s set .00006
@@ -370,12 +369,12 @@ test scale-6.15 {ComputeFormat procedure} {
.s configure -to .000001 -from .00001 -resolution .000001
.s set .000006
expr {[.s get] == 6.0e-06}
-} 1
+} {1}
test scale-6.16 {ComputeFormat procedure} {
.s configure -from .00001 -to .0001 -resolution .00001 -digits 1
.s set .00006
expr {[.s get] == 6e-05}
-} 1
+} {1}
test scale-6.17 {ComputeFormat procedure} {
.s configure -from 10000000 -to 100000000 -resolution 10000000 -digits 3
.s set 49300000
@@ -799,3 +798,20 @@ test scale-16.1 {scale widget vs hidden commands} {
catch {destroy .s}
option clear
+
+# cleanup
+::tcltest::cleanupTests
+return
+
+
+
+
+
+
+
+
+
+
+
+
+