summaryrefslogtreecommitdiffstats
path: root/tests/option.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-05-23 17:34:48 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-05-23 17:34:48 (GMT)
commit7c820a9ae19502e7f5d59f4310c33bfeb64bf9ba (patch)
treec1834b8cace8654026ee20f8fd75ea3f340a902c /tests/option.test
parentfc07382fecf576d43fc28117ca52416170fb0f4f (diff)
downloadtk-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/option.test')
-rw-r--r--tests/option.test21
1 files changed, 4 insertions, 17 deletions
diff --git a/tests/option.test b/tests/option.test
index 7ddaa96..2cdd675 100644
--- a/tests/option.test
+++ b/tests/option.test
@@ -6,12 +6,14 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: option.test,v 1.5 2003/04/01 21:06:48 dgp Exp $
+# RCS: @(#) $Id: option.test,v 1.6 2004/05/23 17:34:49 dkf Exp $
package require tcltest 2.1
eval tcltest::configure $argv
tcltest::loadTestedCommands
+testConstraint appNameIsTktest [expr {[winfo name .] eq "tktest"}]
+
catch {destroy .op1}
catch {destroy .op2}
set appName [winfo name .]
@@ -193,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} {}
@@ -227,16 +227,3 @@ catch {destroy .op2}
# cleanup
cleanupTests
return
-
-
-
-
-
-
-
-
-
-
-
-
-