summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/font.test10
-rw-r--r--tests/imgPhoto.test12
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/font.test b/tests/font.test
index b8c0144..6f31df8 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -1956,6 +1956,16 @@ test font-31.6 {Tk_IntersectTextLayout procedure: ignore spaces at eol} -body {
.t.c itemconfig text -width 0
return $x
} -result {}
+test font-31.7 {TkIntersectAngledTextLayout procedure: bug [514ff64dd0]} -body {
+ csetup "This is line one\nand line two\nand line three here"
+ .t.c itemconfigure text -angle 90
+ # Coordinates of the rectangle to check can be hardcoded:
+ # The goal of this test is to check whether the overlap detection algorithm
+ # works when the rectangle is entirely included in a chunk of the text layout.
+ # The text has been rotated 90 degrees around it's upper left corner,
+ # so it's enough to check with a small rectangle with small negative y coords.
+ .t.c find overlapping 5 -7 7 -5
+} -result {1}
destroy .t.c
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index f67de84..d2b4668 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -959,6 +959,18 @@ test imgPhoto-4.75 {<photo> read command: filename starting with '-'} -constrain
image delete photo1
file delete ./-teapotPhotoFile
} -result {}
+test imgPhoto-4.76 {ImgPhotoCmd procedure: copy to same image} -constraints {
+ hasTeapotPhoto
+} -setup {
+ imageCleanup
+ image create photo photo1 -file $teapotPhotoFile
+} -body {
+ # non-regression test for bug [5239fd749b] - shall just not crash
+ photo1 copy photo1 -to 0 0 2000 1000
+ photo1 copy photo1 -subsample 2 2 -shrink
+} -cleanup {
+ imageCleanup
+} -result {}
test imgPhoto-4.76 {ImgPhotoCmd, transparancy get: too many options} -setup {
image create photo photo1
} -body {