From 9dacdf6d83a7ba81eeda081687f00a777d43530a Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 10 Feb 2000 08:53:00 +0000 Subject: * tests/scrollbar.test: fixed check of testmetrics command to allow unix tests to run (testmetrics is mac/pc only) --- tests/scrollbar.test | 23 ++++++++++++----------- 1 file 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] } } } -- cgit v0.12