summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-01 10:13:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-01 10:13:43 (GMT)
commit620c38bf41d68d50e812c79cd6b16d341010e5e6 (patch)
tree0f0c27c7d8ac4d0e2e6d3dc058f6dabed14e8429 /tests
parent4d9d4cbb74c5e7fc099fcb08706909d8fc04027b (diff)
parentc7cabc58dd1096add0d3d34a4fe54fd1d6eebff4 (diff)
downloadtk-620c38bf41d68d50e812c79cd6b16d341010e5e6.zip
tk-620c38bf41d68d50e812c79cd6b16d341010e5e6.tar.gz
tk-620c38bf41d68d50e812c79cd6b16d341010e5e6.tar.bz2
merge core-8-6-branch
Diffstat (limited to 'tests')
-rw-r--r--tests/imgBmap.test3
-rw-r--r--tests/imgPhoto.test73
2 files changed, 75 insertions, 1 deletions
diff --git a/tests/imgBmap.test b/tests/imgBmap.test
index 5ffd7c4..e7f2c7e 100644
--- a/tests/imgBmap.test
+++ b/tests/imgBmap.test
@@ -380,7 +380,8 @@ test imageBmap-7.9 {ImgBmapCmd procedure} -body {
test imageBmap-7.10 {ImgBmapCmd procedure} -body {
i1 gorp
} -returnCodes error -result {bad option "gorp": must be cget or configure}
-
+# Clean it up after use!!
+imageCleanup
test imageBmap-8.1 {ImgBmapGet/Free procedures, shared instances} -setup {
destroy .c
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index f9ffa94..86da23d 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -953,6 +953,44 @@ test imgPhoto-10.1 {Tk_ImgPhotoPutBlock procedure} -setup {
photo1 put "{#00ff00 #00ff00}" -to 2 0
list [photo1 get 2 0] [photo1 get 3 0] [photo1 get 4 0]
} -result {{0 255 0} {0 255 0} {255 0 0}}
+test imgPhoto-10.2 {Tk_ImgPhotoPutBlock, same source and dest img} -constraints {
+ hasTeapotPhoto
+} -setup {
+ imageCleanup
+} -body {
+ # Test for bug e4336bef5d
+ image create photo photo1 -file $teapotPhotoFile
+ image create photo photo2 -file $teapotPhotoFile
+ photo2 copy photo1 -to 1 2
+ photo1 copy photo1 -to 1 2
+ string equal [photo1 data] [photo2 data]
+} -cleanup {
+ imageCleanup
+} -result {1}
+test imgPhoto-10.3 {Tk_ImgPhotoPutBlock, same source and dest img} -constraints {
+ hasTeapotPhoto
+} -setup {
+ imageCleanup
+} -body {
+ # Test for bug e4336bef5d
+ image create photo photo1 -file $teapotPhotoFile
+ image create photo photo2 -file $teapotPhotoFile
+ photo2 copy photo1 -from 2 1 -to 4 5 300 300
+ photo1 copy photo1 -from 2 1 -to 4 5 300 300
+ string equal [photo1 data] [photo2 data]
+} -cleanup {
+ imageCleanup
+} -result {1}
+test imgPhoto-10.4 {Tk_ImgPhotoPutBlock, empty image} -setup {
+ imageCleanup
+} -body {
+ image create photo photo1
+ photo1 copy photo1 -to 0 5 10 20
+ list [image width photo1] [image height photo1]
+} -cleanup {
+ imageCleanup
+} -result {0 0}
+
test imgPhoto-11.1 {Tk_FindPhoto} -setup {
imageCleanup
@@ -972,6 +1010,41 @@ test imgPhoto-12.1 {Tk_PhotoPutZoomedBlock} -constraints hasTeapotPhoto -body {
} -cleanup {
image delete p3
} -result {{19 92 192} {169 117 90} 512 512 {19 92 192}}
+test imgPhoto-12.2 {Tk_ImgPhotoPutZoomedBlock, same source and dest img} -constraints {
+ hasTeapotPhoto
+} -setup {
+ imageCleanup
+} -body {
+ # Test for bug e4336bef5d
+ image create photo photo1 -file $teapotPhotoFile
+ image create photo photo2 -file $teapotPhotoFile
+ photo2 copy photo1 -to 0 1 200 200 -zoom 2 3
+ photo1 copy photo1 -to 0 1 200 200 -zoom 2 3
+ string equal [photo1 data] [photo2 data]
+} -cleanup {
+ imageCleanup
+} -result {1}
+test imgPhoto-12.3 {Tk_ImgPhotoPutZoomedBlock, same source and dest img} -setup {
+ imageCleanup
+} -body {
+ # Test for bug e4336bef5d
+ image create photo photo1 -file $teapotPhotoFile
+ image create photo photo2 -file $teapotPhotoFile
+ photo2 copy photo1 -from 1 0 -to 4 5 300 300 -zoom 1 2
+ photo1 copy photo1 -from 1 0 -to 4 5 300 300 -zoom 1 2
+ string equal [photo1 data] [photo2 data]
+} -cleanup {
+ imageCleanup
+} -result {1}
+test imgPhoto-12.4 {Tk_ImgPhotoPutZoomedBlock, empty image} -setup {
+ imageCleanup
+} -body {
+ image create photo photo1
+ photo1 copy photo1 -to 0 5 10 20
+ list [image width photo1] [image height photo1]
+} -cleanup {
+ imageCleanup
+} -result {0 0}
test imgPhoto-13.1 {check separation of images in different interpreters} -setup {
imageCleanup