summaryrefslogtreecommitdiffstats
path: root/tests/imgPPM.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-12-08 03:02:52 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-12-08 03:02:52 (GMT)
commit21df9ae7a1997e227dd3deb9a4855ab9b40bac7f (patch)
tree0d85c25f22d5dc509dc72c795506d36d9ae793f9 /tests/imgPPM.test
parent4180597529a6eee5a39a5cd58cc6275e2dd232f3 (diff)
downloadtk-21df9ae7a1997e227dd3deb9a4855ab9b40bac7f.zip
tk-21df9ae7a1997e227dd3deb9a4855ab9b40bac7f.tar.gz
tk-21df9ae7a1997e227dd3deb9a4855ab9b40bac7f.tar.bz2
* tests/canvPs.test: Cleaned up the matching of [makeFile] and
* tests/choosedir.test: [removeFile] commands as indicated by the * tests/filebox.test: results of a -debug 1 run of the test suite. * tests/imgPPM.test: Tk test suite is now -debug 1 clean. This * tests/imgPhoto.test: completes fixing [1078648]. * tests/listbox.test: * tests/main.test:
Diffstat (limited to 'tests/imgPPM.test')
-rw-r--r--tests/imgPPM.test11
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