diff options
Diffstat (limited to 'tests/imgPPM.test')
-rw-r--r-- | tests/imgPPM.test | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/imgPPM.test b/tests/imgPPM.test index 1e043bd..53aa4c7 100644 --- a/tests/imgPPM.test +++ b/tests/imgPPM.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: imgPPM.test,v 1.7 2004/05/23 17:34:48 dkf Exp $ +# RCS: @(#) $Id: imgPPM.test,v 1.8 2004/12/08 03:03:06 dgp Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -14,6 +14,8 @@ tcltest::loadTestedCommands eval image delete [image names] +# Note that we do not use [tcltest::makeFile] because it is +# only suitable for text files proc put {file data} { set f [open $file w] fconfigure $f -translation lf @@ -68,8 +70,8 @@ test imgPPM-2.1 {FileWritePPM procedure} { } {1 {couldn't open "not_a_dir/bar/baz/gorp": no such file or directory} {posix enoent {no such file or directory}}} test imgPPM-2.2 {FileWritePPM procedure} { catch {unset data} - p1 write -format ppm test2.ppm - set fd [open test2.ppm] + p1 write -format ppm test.ppm + set fd [open test.ppm] set data [read $fd] close $fd set data @@ -144,10 +146,9 @@ test imgPPM-3.13 {ReadPPMFileHeader procedure, file ends too soon} { list [catch {image create photo p1 -file test.ppm} msg] $msg } {1 {couldn't recognize data in image file "test.ppm"}} -removeFile test.ppm -removeFile test2.ppm eval image delete [image names] # cleanup +catch {file delete test.ppm} cleanupTests return |