diff options
Diffstat (limited to 'tests/scrollbar.test')
-rw-r--r-- | tests/scrollbar.test | 23 |
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] } } } |