diff options
Diffstat (limited to 'tests/imgPhoto.test')
-rw-r--r-- | tests/imgPhoto.test | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index 79fede0..d4118b0 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -10,15 +10,9 @@ # Author: Paul Mackerras (paulus@cs.anu.edu.au) package require tcltest 2.1 -namespace import -force tcltest::configure -namespace import -force tcltest::testsDirectory -configure -testdir [file join [pwd] [file dirname [info script]]] -configure -loadfile [file join [testsDirectory] constraints.tcl] +eval tcltest::configure $argv tcltest::loadTestedCommands -namespace import -force tcltest::makeFile -namespace import -force tcltest::removeFile - eval image delete [image names] canvas .c @@ -27,20 +21,11 @@ update set README [makeFile { README -- Tk test suite design document. -} README-imgPhotot] +} 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 - } -} +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 @@ -412,7 +397,7 @@ proc checkImgTransLoopResetSet {img width height} { } return $result } -test imgPhoto-4.68 {ImgPhotoCmd procedure: transparency set option} { +test imgPhoto-4.67a {ImgPhotoCmd procedure: transparency set option} { checkImgTransLoopResetSet p1 3 3 } {0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2 , 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2 . 0 0 0 2 1 0 1 1 1 2 2 0 2 1 2 2 , 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2 . 0 0 0 1 1 0 1 1 1 2 2 0 2 1 2 2 , 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2 . 0 0 0 1 0 2 1 1 1 2 2 0 2 1 2 2 , 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2 . 0 0 0 1 0 2 1 0 1 2 2 0 2 1 2 2 , 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2 . 0 0 0 1 0 2 1 0 1 1 2 0 2 1 2 2 , 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2 . 0 0 0 1 0 2 1 0 1 1 1 2 2 1 2 2 , 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2 . 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 2 , 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2 . 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 , 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2 .} catch {rename checkImgTransLoopSetReset {}} @@ -571,7 +556,7 @@ test imgPhoto-12.1 {Tk_PhotoPutZoomedBlock} hasTeapotPhoto { } {{19 92 192} {169 117 90} 512 512 {19 92 192}} test imgPhoto-13.1 {check separation of images in different interpreters} { - eval image delete [image names] + image delete {*}[image names] set data { R0lGODlhQgBkAPUAANbWxs7Wxs7OxsbOxsbGxsbGvb3Gvca9vcDAwL21vbW1vbW1tbWtta2t ta2ltaWltaWlraWctaWcrZycrZyUrZSUrZSMrZSMpYyMrYyMpYyEpYSEpYR7pYR7nHp7pYRz @@ -614,7 +599,6 @@ test imgPhoto-13.1 {check separation of images in different interpreters} { interp delete x2 } {} - test imgPhoto-14.1 {GIF writes work correctly} { set data "R0lGODlhYwA5APcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgAysnGy8hKzM hASs3MTcjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA @@ -657,10 +641,10 @@ test imgPhoto-14.2 {GIF -index handler buffer sizing} -setup { # Bug 1458234 makes this crash when trying to access buffers of the # wrong size, caused when the initial frame is not the largest frame. set data { - R0lGODlhIAAgAKEAAPkOSQsi7////////yH/C05FVFNDQVBFMi4wAwEAAAAh - +QQJMgAAACwGAAYAFAAUAAACEYyPqcvtD6OctNqLs968+68VACH5BAkyAAEA - LAMAAwAaABoAAAI0jH+gq+gfmFzQzUsr3gBybn1gIm5kaUaoubbuC8fyTNel - Ohv1CSO533u8KrgbUfc5Ci/EAgA7 + R0lGODlhIAAgAKEAAPkOSQsi7////////yH/C05FVFNDQVBFMi4wAwEAAAAh + +QQJMgAAACwGAAYAFAAUAAACEYyPqcvtD6OctNqLs968+68VACH5BAkyAAEA + LAMAAwAaABoAAAI0jH+gq+gfmFzQzUsr3gBybn1gIm5kaUaoubbuC8fyTNel + Ohv1CSO533u8KrgbUfc5Ci/EAgA7 } $i configure -data $data -format {gif -index 2} } -cleanup { @@ -728,5 +712,5 @@ eval image delete [image names] # cleanup removeFile README-imgPhoto -::tcltest::cleanupTests +cleanupTests return |