diff options
author | aniap <aniap> | 2008-08-07 23:05:15 (GMT) |
---|---|---|
committer | aniap <aniap> | 2008-08-07 23:05:15 (GMT) |
commit | 5a6f5ee5a122ea026d28a8cb7f7f6e0c86aecbed (patch) | |
tree | 83a3332dbe8aee043ba35c8da987797605436044 /tests/canvPs.test | |
parent | f599302965961fcb2ea0ab5c179fa3bb3a2d860f (diff) | |
download | tk-5a6f5ee5a122ea026d28a8cb7f7f6e0c86aecbed.zip tk-5a6f5ee5a122ea026d28a8cb7f7f6e0c86aecbed.tar.gz tk-5a6f5ee5a122ea026d28a8cb7f7f6e0c86aecbed.tar.bz2 |
Update to tcltest2
Diffstat (limited to 'tests/canvPs.test')
-rw-r--r-- | tests/canvPs.test | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/tests/canvPs.test b/tests/canvPs.test index 68c3b68..7b566e5 100644 --- a/tests/canvPs.test +++ b/tests/canvPs.test @@ -6,12 +6,14 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: canvPs.test,v 1.12 2006/03/14 05:01:48 dgp Exp $ +# RCS: @(#) $Id: canvPs.test,v 1.13 2008/08/07 23:05:15 aniap Exp $ -package require tcltest 2.1 +package require tcltest 2.2 +namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands +# canvas used in 1.* and 2.* test cases canvas .c -width 400 -height 300 -bd 2 -relief sunken .c create rectangle 20 20 80 80 -fill red pack .c @@ -45,6 +47,7 @@ test canvPs-1.2 {test writing to a file, idempotency} -constraints { removeFile bar.ps } -result ok + test canvPs-2.1 {test writing to a channel} -constraints { unixOrPc } -setup { @@ -77,7 +80,7 @@ test canvPs-2.2 {test writing to channel, idempotency} -constraints { close $c2 set status ok if {[file size $bar] != [file size $foo]} { - set status broken + set status broken } set status } -cleanup { @@ -99,7 +102,7 @@ test canvPs-2.3 {test writing to channel and file, same output} -constraints { .c postscript -file $bar set status ok if {[file size $foo] != [file size $bar]} { - set status broken + set status broken } set status } -cleanup { @@ -121,21 +124,22 @@ test canvPs-2.4 {test writing to channel and file, same output} -constraints { .c postscript -file $bar set status ok if {[file size $foo] != [file size $bar]} { - set status broken + set status broken } set status } -cleanup { removeFile foo.ps removeFile bar.ps } -result ok +destroy .c + -test canvPs-3.1 {test ps generation with an embedded window} -setup { +test canvPs-3.1 {test ps generation with an embedded window} -constraints { + notAqua +} -setup { set bar [makeFile {} bar.ps] file delete $bar -} -constraints { - notAqua } -body { - destroy .c pack [canvas .c -width 200 -height 200 -background white] .c create rect 20 20 150 150 -tags rect0 -dash . -width 2 .c create arc 0 50 200 200 -tags arc0 \ @@ -152,13 +156,13 @@ test canvPs-3.1 {test ps generation with an embedded window} -setup { .c postscript -file $bar file exists $bar } -cleanup { + destroy .c removeFile bar.ps -} -result 1 +} -result {1} test canvPs-3.2 {test ps generation with an embedded window not mapped} -setup { set bar [makeFile {} bar.ps] file delete $bar } -body { - destroy .c pack [canvas .c -width 200 -height 200 -background white] entry .c.e -background pink -foreground blue -width 14 .c.e insert 0 "we gonna be postscripted" @@ -166,15 +170,19 @@ test canvPs-3.2 {test ps generation with an embedded window not mapped} -setup { .c postscript -file $bar file exists $bar } -cleanup { + destroy .c removeFile bar.ps -} -result 1 +} -result {1} -test canvPs-4.1 {test ps generation with single-point uncolored poly, bug 734498} {} { - destroy .c + +test canvPs-4.1 {test ps generation with single-point uncolored poly, bug 734498} -body { pack [canvas .c] .c create poly 10 20 10 20 - catch {.c postscript} -} 0 + .c postscript +} -cleanup { + destroy .c +} -returnCodes ok -match glob -result * + # cleanup unset -nocomplain foo bar |