diff options
Diffstat (limited to 'tests/option.test')
-rw-r--r-- | tests/option.test | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/tests/option.test b/tests/option.test index 0cc2d14..49d2975 100644 --- a/tests/option.test +++ b/tests/option.test @@ -7,14 +7,10 @@ # All rights reserved. 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} @@ -197,9 +193,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} {} @@ -229,18 +223,5 @@ catch {destroy .op1} catch {destroy .op2} # cleanup -::tcltest::cleanupTests +cleanupTests return - - - - - - - - - - - - - |