summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorculler <culler>2019-02-13 16:12:16 (GMT)
committerculler <culler>2019-02-13 16:12:16 (GMT)
commit4266bcfcf2a8caf18483c350a3139a69ac753402 (patch)
tree5edeae38a2d0aa789d9aeabbe6b74c4a044cafb9 /tests
parentf0b015abf1cd2457689595d92c44b8993297d19b (diff)
downloadtk-4266bcfcf2a8caf18483c350a3139a69ac753402.zip
tk-4266bcfcf2a8caf18483c350a3139a69ac753402.tar.gz
tk-4266bcfcf2a8caf18483c350a3139a69ac753402.tar.bz2
Two text tests also try to position a window with y = 0. Tweak these for Aqua.
Diffstat (limited to 'tests')
-rw-r--r--tests/text.test15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/text.test b/tests/text.test
index aaddc2c..be25ca6 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -3474,6 +3474,12 @@ test text-14.18 {ConfigureText procedure} -constraints fonts -setup {
# minimum size and it was interfering with the size requested by the -setgrid.
# The "overrideredirect" gets rid of the titlebar so the toplevel can shrink
# to the appropriate size.
+# On macOS, however, there is no way to make the window overlap the menubar.
+if {[tk windowingsystem] == "aqua"} {
+ set minY 23
+} else {
+ set minY 0
+}
test text-14.19 {ConfigureText procedure} -setup {
toplevel .top
text .top.t -font {Courier -12} -borderwidth 2 -highlightthickness 2
@@ -3481,16 +3487,17 @@ test text-14.19 {ConfigureText procedure} -setup {
.top.t configure -width 20 -height 10 -setgrid 1
wm overrideredirect .top 1
pack .top.t
- wm geometry .top +0+0
+ wm geometry .top +0+$minY
update
wm geometry .top
} -cleanup {
destroy .top
-} -result {20x10+0+0}
+} -result "20x10+0+$minY"
# This test was failing on Windows because the title bar on .t was a certain
# minimum size and it was interfering with the size requested by the -setgrid.
# The "overrideredirect" gets rid of the titlebar so the toplevel can shrink
# to the appropriate size.
+# On macOS we again use minY as a workaround.
test text-14.20 {ConfigureText procedure} -setup {
toplevel .top
text .top.t -font {Courier -12} -borderwidth 2 -highlightthickness 2
@@ -3498,7 +3505,7 @@ test text-14.20 {ConfigureText procedure} -setup {
.top.t configure -width 20 -height 10 -setgrid 1
wm overrideredirect .top 1
pack .top.t
- wm geometry .top +0+0
+ wm geometry .top +0+$minY
update
set result [wm geometry .top]
wm geometry .top 15x8
@@ -3509,7 +3516,7 @@ test text-14.20 {ConfigureText procedure} -setup {
lappend result [wm geometry .top]
} -cleanup {
destroy .top
-} -result {20x10+0+0 15x8+0+0 15x8+0+0}
+} -result "20x10+0+$minY 15x8+0+$minY 15x8+0+$minY"
test text-15.1 {TextWorldChanged procedure, spacing options} -constraints {