diff options
author | culler <culler> | 2019-02-13 21:02:34 (GMT) |
---|---|---|
committer | culler <culler> | 2019-02-13 21:02:34 (GMT) |
commit | 3469df6a780ed8f083665cbfdaca79453da2e982 (patch) | |
tree | fd5862570d68acab47ce7de6e5e81a037962ed13 /tests/text.test | |
parent | bf53ad5c9a0de20d1a9952aecd213c2d0432ebb3 (diff) | |
parent | fa6377112a54cd65d14f6ed2559ac26b684fdbb8 (diff) | |
download | tk-3469df6a780ed8f083665cbfdaca79453da2e982.zip tk-3469df6a780ed8f083665cbfdaca79453da2e982.tar.gz tk-3469df6a780ed8f083665cbfdaca79453da2e982.tar.bz2 |
Fix bug [2249e64bdc]: adjust unixWm tests which expect impossible results on Aqua.
Diffstat (limited to 'tests/text.test')
-rw-r--r-- | tests/text.test | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/text.test b/tests/text.test index 5359407..3314fc9 100644 --- a/tests/text.test +++ b/tests/text.test @@ -3486,6 +3486,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 @@ -3493,16 +3499,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 @@ -3510,7 +3517,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 @@ -3521,7 +3528,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 { |