summaryrefslogtreecommitdiffstats
path: root/tests/imgPhoto.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-10-12 09:29:21 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-10-12 09:29:21 (GMT)
commit25545eb7dcc6b464fa5786a03fffb174b31e0fd0 (patch)
tree707e730ffb01d5f4315270f9550f0e3f18379104 /tests/imgPhoto.test
parent33189491c7086c538aa840c37a4c4f967926c7b2 (diff)
downloadtk-25545eb7dcc6b464fa5786a03fffb174b31e0fd0.zip
tk-25545eb7dcc6b464fa5786a03fffb174b31e0fd0.tar.gz
tk-25545eb7dcc6b464fa5786a03fffb174b31e0fd0.tar.bz2
Arrange the test suite so that it only accesses images in the same directory.
This enables packaging of the test suite as a starkit.
Diffstat (limited to 'tests/imgPhoto.test')
-rw-r--r--tests/imgPhoto.test15
1 files changed, 3 insertions, 12 deletions
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index d79dad0..1c371bc 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -9,7 +9,7 @@
#
# Author: Paul Mackerras (paulus@cs.anu.edu.au)
#
-# RCS: @(#) $Id: imgPhoto.test,v 1.21 2004/12/08 03:03:06 dgp Exp $
+# RCS: @(#) $Id: imgPhoto.test,v 1.22 2005/10/12 09:29:21 dkf Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -26,17 +26,8 @@ README -- Tk test suite design document.
} README-imgPhoto]
# find the teapot.ppm file for use in these tests
-# first look in $tk_library/demos/images/teapot.ppm
-# then look in <this file>/../../library/demos/images/teapot.ppm
-testConstraint hasTeapotPhoto 1
-set teapotPhotoFile [file join $tk_library demos images teapot.ppm]
-if {![file exists $teapotPhotoFile]} {
- set newLib [file dirname [testsDirectory]]
- set teapotPhotoFile [file join $newLib library demos images teapot.ppm]
- if {![file exists $teapotPhotoFile]} {
- testConstraint hasTeapotPhoto 0
- }
-}
+set teapotPhotoFile [file join [file dirname [info script]] teapot.ppm]
+testConstraint hasTeapotPhoto [file exists $teapotPhotoFile]
test imgPhoto-1.1 {options for photo images} {
image create photo p1 -width 79 -height 83