diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2004-05-23 17:34:48 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2004-05-23 17:34:48 (GMT) |
commit | 0b91402efd4f090b076ac7f71ed939ed664400b2 (patch) | |
tree | c1834b8cace8654026ee20f8fd75ea3f340a902c /tests/entry.test | |
parent | 08844409ecd112b5d70f7c06e5a05b015e3022c4 (diff) | |
download | tk-0b91402efd4f090b076ac7f71ed939ed664400b2.zip tk-0b91402efd4f090b076ac7f71ed939ed664400b2.tar.gz tk-0b91402efd4f090b076ac7f71ed939ed664400b2.tar.bz2 |
First step towards improving test style. Also start using Tcl 8.5 features.
Diffstat (limited to 'tests/entry.test')
-rw-r--r-- | tests/entry.test | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/entry.test b/tests/entry.test index a8742b6..8a5713e 100644 --- a/tests/entry.test +++ b/tests/entry.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: entry.test,v 1.16 2004/03/17 18:15:49 das Exp $ +# RCS: @(#) $Id: entry.test,v 1.17 2004/05/23 17:34:48 dkf Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -81,16 +81,16 @@ foreach test { {-width 402 402 3p {expected integer but got "3p"}} {-xscrollcommand {Some command} {Some command} {} {}} } { - set name [lindex $test 0] + lassign $test name goodValue goodResult badValue badResult test entry-1.$i {configuration options} { - .e configure $name [lindex $test 1] + .e configure $name $goodValue list [lindex [.e configure $name] 4] [.e cget $name] - } [list [lindex $test 2] [lindex $test 2]] + } [list $goodResult $goodResult] incr i - if {[lindex $test 3] != ""} { - test entry-1.$i {configuration options} { - list [catch {.e configure $name [lindex $test 3]} msg] $msg - } [list 1 [lindex $test 4]] + if {$badValue ne ""} { + test entry-1.$i {configuration options} -body { + .e configure $name $badValue + } -returnCodes error -result $badResult } .e configure $name [lindex [.e configure $name] 3] incr i |