summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-02-10 08:53:00 (GMT)
committerhobbs <hobbs>2000-02-10 08:53:00 (GMT)
commit9dacdf6d83a7ba81eeda081687f00a777d43530a (patch)
tree4d708fa0b45279d0ac168335acfd9f7c25f48612
parent590d429c5fcd570547336bc7ab06310f35f35c0f (diff)
downloadtk-9dacdf6d83a7ba81eeda081687f00a777d43530a.zip
tk-9dacdf6d83a7ba81eeda081687f00a777d43530a.tar.gz
tk-9dacdf6d83a7ba81eeda081687f00a777d43530a.tar.bz2
* tests/scrollbar.test: fixed check of testmetrics command to
allow unix tests to run (testmetrics is mac/pc only)
-rw-r--r--tests/scrollbar.test23
1 files changed, 12 insertions, 11 deletions
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index 979f368..7c0305c 100644
--- a/tests/scrollbar.test
+++ b/tests/scrollbar.test
@@ -7,16 +7,17 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: scrollbar.test,v 1.5 1999/12/14 06:53:14 hobbs Exp $
+# RCS: @(#) $Id: scrollbar.test,v 1.6 2000/02/10 08:53:00 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
}
-if {[info commands testmetrics] == {}} {
- puts "This application hasn't been compiled with the \"testmetrics\""
- puts "command, so I can't run this test. Are you sure you're using"
- puts "tktest instead of wish?"
+## testmetrics is a win/mac only test command
+##
+if {[string compare unix $tcl_platform(platform)] && \
+ [string equal {} [info commands testmetrics]]} {
+ puts "\"testmetrics\" isn't defined, skipping scrollbar tests"
::tcltest::cleanupTests
return
}
@@ -44,14 +45,14 @@ proc getTroughSize {w} {
} else {
if [string match v* [$w cget -orient]] {
return [expr [winfo height $w] \
- - ([winfo width $w] \
- - [$w cget -highlightthickness] \
- - [$w cget -bd] + 1)*2]
+ - ([winfo width $w] \
+ - [$w cget -highlightthickness] \
+ - [$w cget -bd] + 1)*2]
} else {
return [expr [winfo width $w] \
- - ([winfo height $w] \
- - [$w cget -highlightthickness] \
- - [$w cget -bd] + 1)*2]
+ - ([winfo height $w] \
+ - [$w cget -highlightthickness] \
+ - [$w cget -bd] + 1)*2]
}
}
}