summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/constraints.tcl4
-rw-r--r--tests/imgPhoto.test16
-rw-r--r--tests/menu.test3
3 files changed, 20 insertions, 3 deletions
diff --git a/tests/constraints.tcl b/tests/constraints.tcl
index ad0ca85..22bc52d 100644
--- a/tests/constraints.tcl
+++ b/tests/constraints.tcl
@@ -296,6 +296,10 @@ testConstraint testtext [llength [info commands testtext]]
testConstraint testwinevent [llength [info commands testwinevent]]
testConstraint testwrapper [llength [info commands testwrapper]]
+# the earth.gif file is used in some tests
+set earthPhotoFile [file join [file dirname [info script]] earth.gif]
+testConstraint hasEarthPhoto [file exists $earthPhotoFile]
+
# constraints about what sort of fonts are available
testConstraint fonts 1
destroy .e
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index 1d3b6e5..54294b9 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -1425,6 +1425,22 @@ test imgPhoto-18.12 {Valid GIF (file)} -setup {
catch {image delete gif1}
} -result gif1
+test imgPhoto-19.1 {Read GIF file with -from option - Bug [1576528]} -constraints hasEarthPhoto -body {
+ image create photo gif1
+ gif1 read $earthPhotoFile -from 152 62 185 97
+ lindex [lindex [gif1 data] 0] 0
+} -cleanup {
+ catch {image delete gif1}
+} -result {#d8c8b8}
+test imgPhoto-19.2 {Read GIF file, copy with -from option} -constraints hasEarthPhoto -body {
+ image create photo gif1 -file $earthPhotoFile
+ image create photo gif2
+ gif2 copy gif1 -from 152 62 185 97
+ lindex [lindex [gif2 data] 0] 0
+} -cleanup {
+ catch {image delete gif1 ; image delete gif2}
+} -result {#d8c8b8}
+
catch {rename foreachPixel {}}
catch {rename checkImgTrans {}}
catch {rename checkImgTransLoop {}}
diff --git a/tests/menu.test b/tests/menu.test
index 7fed665..8b3b556 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -11,9 +11,6 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
imageInit
-# find the earth.gif file for use in these tests (tests 2.*)
-set earthPhotoFile [file join [file dirname [info script]] earth.gif]
-testConstraint hasEarthPhoto [file exists $earthPhotoFile]
testConstraint pressbutton [llength [info commands pressbutton]]
testConstraint movemouse [llength [info commands movemouse]]