diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-05-23 17:34:48 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-05-23 17:34:48 (GMT) |
commit | 7c820a9ae19502e7f5d59f4310c33bfeb64bf9ba (patch) | |
tree | c1834b8cace8654026ee20f8fd75ea3f340a902c /tests/clrpick.test | |
parent | fc07382fecf576d43fc28117ca52416170fb0f4f (diff) | |
download | tk-7c820a9ae19502e7f5d59f4310c33bfeb64bf9ba.zip tk-7c820a9ae19502e7f5d59f4310c33bfeb64bf9ba.tar.gz tk-7c820a9ae19502e7f5d59f4310c33bfeb64bf9ba.tar.bz2 |
First step towards improving test style. Also start using Tcl 8.5 features.
Diffstat (limited to 'tests/clrpick.test')
-rw-r--r-- | tests/clrpick.test | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/clrpick.test b/tests/clrpick.test index 5e19770..70f1a52 100644 --- a/tests/clrpick.test +++ b/tests/clrpick.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: clrpick.test,v 1.9 2004/03/17 18:15:49 das Exp $ +# RCS: @(#) $Id: clrpick.test,v 1.10 2004/05/23 17:34:48 dkf Exp $ # package require tcltest 2.1 @@ -21,10 +21,10 @@ regsub -all , $msg "" options regsub \"-foo\" $options "" options foreach option $options { - if {[string index $option 0] == "-"} { - test clrpick-1.2 {tk_chooseColor command} { - list [catch {tk_chooseColor $option} msg] $msg - } [list 1 "value for \"$option\" missing"] + if {[string index $option 0] eq "-"} { + test clrpick-1.2$option {tk_chooseColor command} -body { + tk_chooseColor $option + } -returnCodes error -result "value for \"$option\" missing" } } @@ -48,11 +48,7 @@ test clrpick-1.7 {tk_chooseColor command} { list [catch {tk_chooseColor -initialcolor ##badbadbaadcolor} msg] $msg } {1 {invalid color name "##badbadbaadcolor"}} -if {[info commands tk::dialog::color::] == ""} { - set isNative 1 -} else { - set isNative 0 -} +set isNative [expr {[info commands tk::dialog::color::] eq ""}] proc ToPressButton {parent btn} { global isNative |