diff options
Diffstat (limited to 'tests/option.test')
-rw-r--r-- | tests/option.test | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/tests/option.test b/tests/option.test index 173ec37..2cdd675 100644 --- a/tests/option.test +++ b/tests/option.test @@ -6,17 +6,13 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: option.test,v 1.4 2002/07/13 20:28:35 dgp Exp $ +# RCS: @(#) $Id: option.test,v 1.6 2004/05/23 17:34:49 dkf Exp $ package require tcltest 2.1 -namespace import -force tcltest::configure -namespace import -force tcltest::testsDirectory -configure -testdir [file join [pwd] [file dirname [info script]]] -configure -loadfile [file join [testsDirectory] constraints.tcl] +eval tcltest::configure $argv tcltest::loadTestedCommands -namespace import -force tcltest::makeFile -namespace import -force tcltest::removeFile +testConstraint appNameIsTktest [expr {[winfo name .] eq "tktest"}] catch {destroy .op1} catch {destroy .op2} @@ -199,9 +195,7 @@ test option-15.1 {database files} { } {1 {couldn't open "non-existent": no such file or directory}} option read $option1 test option-15.2 {database files} {option get . x1 color} blue -if {$appName == "tktest"} { - test option-15.3 {database files} {option get . x2 color} green -} +test option-15.3 {database files} appNameIsTktest {option get . x2 color} green test option-15.4 {database files} {option get . x3 color} purple test option-15.5 {database files} {option get . {x 4} color} brown test option-15.6 {database files} {option get . x6 color} {} @@ -231,18 +225,5 @@ catch {destroy .op1} catch {destroy .op2} # cleanup -::tcltest::cleanupTests +cleanupTests return - - - - - - - - - - - - - |