summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-08 16:04:33 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-08 16:04:33 (GMT)
commit089a364ffa502039ae4d42853857206dbeddc250 (patch)
tree4701b3aff5e43914b137d6bc202f02192bc0c9c0
parent611539b46b3f35feff024c8e9c22b8bf93a025d8 (diff)
parent10bca5a542048ae2e11701980f2997e26ce28433 (diff)
downloadtk-089a364ffa502039ae4d42853857206dbeddc250.zip
tk-089a364ffa502039ae4d42853857206dbeddc250.tar.gz
tk-089a364ffa502039ae4d42853857206dbeddc250.tar.bz2
Merge 8.6
-rw-r--r--tests/canvText.test3
-rw-r--r--tests/clipboard.test4
-rw-r--r--tests/entry.test3
-rw-r--r--tests/focus.test9
-rw-r--r--tests/pack.test5
-rw-r--r--tests/place.test5
-rw-r--r--tests/scrollbar.test13
-rw-r--r--tests/textDisp.test29
-rw-r--r--tests/unixEmbed.test9
-rw-r--r--tests/unixFont.test9
-rw-r--r--tests/unixWm.test13
-rw-r--r--tests/winfo.test3
-rw-r--r--tests/wm.test9
-rw-r--r--unix/tkUnixFont.c12
14 files changed, 70 insertions, 56 deletions
diff --git a/tests/canvText.test b/tests/canvText.test
index f39c7f2..80b3585 100644
--- a/tests/canvText.test
+++ b/tests/canvText.test
@@ -12,6 +12,7 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# Canvas used in 1.* - 17.* tests
canvas .c -width 400 -height 300 -bd 2 -relief sunken
@@ -942,7 +943,7 @@ test canvText-19.1 {patch 1006286, leading space caused wrap under Win32} -setup
destroy .c
} -result {{Yeah } Yeah- 4 4}
-test canvText-20.1 {angled text bounding box} -constraints failsOnUbuntu -setup {
+test canvText-20.1 {angled text bounding box} -constraints {failsOnUbuntu failsOnXQuarz} -setup {
destroy .c
canvas .c
proc transpose {bbox} {
diff --git a/tests/clipboard.test b/tests/clipboard.test
index 81534d5..7c1a506 100644
--- a/tests/clipboard.test
+++ b/tests/clipboard.test
@@ -21,6 +21,8 @@ namespace import ::tcltest::*
eval tcltest::configure $argv
tcltest::loadTestedCommands
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
+
# set up a very large buffer to test INCR retrievals
set longValue ""
foreach i {a b c d e f g j h i j k l m o p q r s t u v w x y z} {
@@ -233,7 +235,7 @@ test clipboard-6.1 {Tk_ClipboardAppend procedure} -setup {
} -cleanup {
clipboard clear
} -returnCodes ok -result {first chunk second chunk}
-test clipboard-6.2 {Tk_ClipboardAppend procedure} -constraints x11 -setup {
+test clipboard-6.2 {Tk_ClipboardAppend procedure} -constraints {x11 failsOnXQuarz} -setup {
clipboard clear
} -body {
setupbg
diff --git a/tests/entry.test b/tests/entry.test
index bc246e8..4a431f3 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -13,6 +13,7 @@ tcltest::loadTestedCommands
testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
testConstraint failsOnUbuntuNoXft [expr {[testConstraint failsOnUbuntu] || (![catch {tk::pkgconfig get fontsystem} fs] && ($fs eq "xft"))}]
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# For xscrollcommand
set scrollInfo {}
@@ -1704,7 +1705,7 @@ test entry-5.7 {ConfigureEntry procedure} -setup {
test entry-5.8 {ConfigureEntry procedure} -constraints {
- fonts
+ fonts failsOnXQuarz
} -setup {
entry .e -borderwidth 2 -highlightthickness 2
pack .e
diff --git a/tests/focus.test b/tests/focus.test
index 20d25eb..f60d120 100644
--- a/tests/focus.test
+++ b/tests/focus.test
@@ -12,6 +12,7 @@ tcltest::loadTestedCommands
namespace import -force tcltest::test
testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
proc focusSetup {} {
destroy .t
@@ -310,7 +311,7 @@ in .t.b1 NotifyNonlinear
} .t.b1}
test focus-2.6 {TkFocusFilterEvent procedure, FocusIn events} -constraints {
- unix testwrapper failsOnUbuntu
+ unix testwrapper failsOnUbuntu failsOnXQuarz
} -body {
focus .t.b1
focus .
@@ -322,7 +323,7 @@ test focus-2.6 {TkFocusFilterEvent procedure, FocusIn events} -constraints {
list $x $focusInfo
} -result {.t.b1 {press .t.b1 x}}
test focus-2.7 {TkFocusFilterEvent procedure, FocusOut events} -constraints {
- unix testwrapper failsOnUbuntu
+ unix testwrapper failsOnUbuntu failsOnXQuarz
} -body {
set result {}
foreach detail {NotifyAncestor NotifyInferior NotifyNonlinear
@@ -343,7 +344,7 @@ test focus-2.8 {TkFocusFilterEvent procedure, FocusOut events} -constraints {
focus
} -result {.t.b1}
test focus-2.9 {TkFocusFilterEvent procedure, FocusOut events} -constraints {
- unix testwrapper failsOnUbuntu
+ unix testwrapper failsOnUbuntu failsOnXQuarz
} -body {
focus .t.b1
event gen [testwrapper .] <FocusOut> -detail NotifyAncestor
@@ -601,7 +602,7 @@ cleanupbg
# Test 5.1 fails (before and after update)
test focus-5.1 {ChangeXFocus procedure, don't take focus unless have it} -constraints {
- unix testwrapper secureserver failsOnUbuntu
+ unix testwrapper secureserver failsOnUbuntu failsOnXQuarz
} -body {
setupbg
focusSetup
diff --git a/tests/pack.test b/tests/pack.test
index eb3ca3b..ba50d78 100644
--- a/tests/pack.test
+++ b/tests/pack.test
@@ -12,6 +12,7 @@ tcltest::loadTestedCommands
namespace import -force tcltest::test
testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# Create some test windows.
@@ -1543,7 +1544,7 @@ if {[tk windowingsystem] == "win32"} {
}
test pack-18.1 {unmap content when container unmapped} -constraints {
- tempNotPc failsOnUbuntu
+ tempNotPc failsOnUbuntu failsOnXQuarz
} -setup {
eval destroy [winfo child .pack]
} -body {
@@ -1573,7 +1574,7 @@ test pack-18.1 {unmap content when container unmapped} -constraints {
lappend result [winfo ismapped .pack.a]
} -result {1 0 200 75 0 1}
-test pack-18.2 {unmap content when container unmapped} -constraints failsOnUbuntu -setup {
+test pack-18.2 {unmap content when container unmapped} -constraints {failsOnUbuntu failsOnXQuarz} -setup {
eval destroy [winfo child .pack]
} -body {
# adjust the position of .pack before test to avoid a screen switch
diff --git a/tests/place.test b/tests/place.test
index 3da19f6..4bf9689 100644
--- a/tests/place.test
+++ b/tests/place.test
@@ -14,6 +14,7 @@ tcltest::loadTestedCommands
testConstraint memory [llength [info commands memory]]
testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# XXX - This test file is woefully incomplete. At present, only a
# few of the features are tested.
@@ -269,7 +270,7 @@ if {[tk windowingsystem] == "win32"} {
}
}
-test place-8.1 {PlaceStructureProc, mapping and unmapping content} -constraints failsOnUbuntu -setup {
+test place-8.1 {PlaceStructureProc, mapping and unmapping content} -constraints {failsOnUbuntu failsOnXQuarz} -setup {
place forget .t.f2
place forget .t.f
} -body {
@@ -285,7 +286,7 @@ test place-8.1 {PlaceStructureProc, mapping and unmapping content} -constraints
placeUpdate
lappend result [winfo ismapped .t.f2]
} -result {1 0 40 30 0 1}
-test place-8.2 {PlaceStructureProc, mapping and unmapping content} -constraints failsOnUbuntu -setup {
+test place-8.2 {PlaceStructureProc, mapping and unmapping content} -constraints {failsOnUbuntu failsOnXQuarz} -setup {
place forget .t.f2
place forget .t.f
update idletasks
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index 86e742e..6601099 100644
--- a/tests/scrollbar.test
+++ b/tests/scrollbar.test
@@ -12,6 +12,7 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}]
proc scroll args {
@@ -273,13 +274,13 @@ test scrollbar-3.35 {ScrollbarWidgetCmd procedure, "fraction" option} {
format {%.6g} [.s fraction 4 21]
} [format %.6g [expr {(21.0 - ([winfo height .s] - [getTroughSize .s])/2.0) \
/([getTroughSize .s] - 1)}]]
-test scrollbar-3.36 {ScrollbarWidgetCmd procedure, "fraction" option} {x11 failsOnUbuntu} {
+test scrollbar-3.36 {ScrollbarWidgetCmd procedure, "fraction" option} {x11 failsOnUbuntu failsOnXQuarz} {
format {%.6g} [.s fraction 4 179]
} 1
test scrollbar-3.37 {ScrollbarWidgetCmd procedure, "fraction" option} {testmetrics} {
format {%.6g} [.s fraction 4 [expr {200 - [testmetrics cyvscroll .s]}]]
} 1
-test scrollbar-3.38 {ScrollbarWidgetCmd procedure, "fraction" option} {x11 failsOnUbuntu} {
+test scrollbar-3.38 {ScrollbarWidgetCmd procedure, "fraction" option} {x11 failsOnUbuntu failsOnXQuarz} {
format {%.6g} [.s fraction 4 178]
} {0.993711}
test scrollbar-3.39 {ScrollbarWidgetCmd procedure, "fraction" option} {testmetrics win} {
@@ -494,7 +495,7 @@ test scrollbar-6.11.2 {ScrollbarPosition procedure} aqua {
# macOS scrollbars have no arrows nowadays
.s identify 8 4
} {trough1}
-test scrollbar-6.12.1 {ScrollbarPosition procedure} {x11 failsOnUbuntu} {
+test scrollbar-6.12.1 {ScrollbarPosition procedure} {x11 failsOnUbuntu failsOnXQuarz} {
.s identify 8 19
} {arrow1}
test scrollbar-6.12.2 {ScrollbarPosition procedure} aqua {
@@ -552,7 +553,7 @@ test scrollbar-6.28 {ScrollbarPosition procedure} {testmetrics win} {
.s identify [expr {[winfo width .s] / 2}] [expr {[winfo height .s]
- [testmetrics cyvscroll .s] - 1}]
} {trough2}
-test scrollbar-6.29.1 {ScrollbarPosition procedure} {x11 failsOnUbuntu} {
+test scrollbar-6.29.1 {ScrollbarPosition procedure} {x11 failsOnUbuntu failsOnXQuarz} {
.s identify 8 180
} {arrow2}
test scrollbar-6.29.2 {ScrollbarPosition procedure} aqua {
@@ -576,7 +577,7 @@ test scrollbar-6.33 {ScrollbarPosition procedure} win {
test scrollbar-6.34 {ScrollbarPosition procedure} unix {
.s identify 4 100
} {trough2}
-test scrollbar-6.35 {ScrollbarPosition procedure} {unix failsOnUbuntu} {
+test scrollbar-6.35 {ScrollbarPosition procedure} {unix failsOnUbuntu failsOnXQuarz} {
.s identify 18 100
} {trough2}
test scrollbar-6.37 {ScrollbarPosition procedure} win {
@@ -615,7 +616,7 @@ test scrollbar-6.43 {ScrollbarPosition procedure} {testmetrics win} {
.t.s identify [expr {int(.4 / [.t.s delta 1 0]) + [testmetrics cxhscroll .t.s]
- 1}] [expr {[winfo height .t.s] / 2}]
} {slider}
-test scrollbar-6.44 {ScrollbarPosition procedure} {unix failsOnUbuntu} {
+test scrollbar-6.44 {ScrollbarPosition procedure} {unix failsOnUbuntu failsOnXQuarz} {
.t.s identify 100 18
} {trough2}
test scrollbar-6.46 {ScrollbarPosition procedure} win {
diff --git a/tests/textDisp.test b/tests/textDisp.test
index 160e1c8..69c53b2 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -12,6 +12,7 @@ tcltest::loadTestedCommands
namespace import -force tcltest::test
testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# Platform specific procedure for updating the text widget.
@@ -673,7 +674,7 @@ test textDisp-4.7 {UpdateDisplayInfo, filling in extra vertical space} {
updateText
set x
} {8.0 {16.0 17.0 15.0 14.0 13.0 12.0 11.0 10.0 9.0 8.0} {8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0}}
-test textDisp-4.8 {UpdateDisplayInfo, filling in extra vertical space} {
+test textDisp-4.8 {UpdateDisplayInfo, filling in extra vertical space} failsOnXQuarz {
.t delete 1.0 end
.t insert end "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
.t yview 16.0
@@ -736,7 +737,7 @@ test textDisp-4.13 {UpdateDisplayInfo, special handling for top/bottom lines} {
updateText
list $tk_textRelayout $tk_textRedraw
} {{11.0 12.0 13.0} {4.0 10.0 11.0 12.0 13.0}}
-test textDisp-4.14 {UpdateDisplayInfo, special handling for top/bottom lines} {
+test textDisp-4.14 {UpdateDisplayInfo, special handling for top/bottom lines} failsOnXQuarz {
.t tag remove x 1.0 end
.t yview 1.0
updateText
@@ -869,7 +870,7 @@ test textDisp-5.2 {DisplayDLine, line resizes during display} {
} [list 30 30]
.t configure -wrap char
-test textDisp-6.1 {scrolling in DisplayText, scroll up} {
+test textDisp-6.1 {scrolling in DisplayText, scroll up} failsOnXQuarz {
.t delete 1.0 end
.t insert 1.0 "Line 1"
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
@@ -1157,7 +1158,7 @@ test textDisp-8.6 {TkTextChanged} {
updateText
list $tk_textRelayout $tk_textRedraw
} {{1.0 1.20 1.40} {1.0 1.20 1.40}}
-test textDisp-8.7 {TkTextChanged} {
+test textDisp-8.7 {TkTextChanged} failsOnXQuarz {
.t delete 1.0 end
.t insert 1.0 "Line 1 is so long that it wraps around, two times"
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
@@ -1179,7 +1180,7 @@ test textDisp-8.8 {TkTextChanged} {
updateText
list $tk_textRelayout $tk_textRedraw
} {2.0 2.0}
-test textDisp-8.9 {TkTextChanged} {
+test textDisp-8.9 {TkTextChanged} failsOnXQuarz {
.t delete 1.0 end
.t insert 1.0 "Line 1 is so long that it wraps around, two times"
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
@@ -1290,7 +1291,7 @@ test textDisp-9.4 {TkTextRedrawTag} failsOnUbuntu {
updateText
list $tk_textRelayout $tk_textRedraw
} {{2.0 2.20} {2.0 2.20 eof}}
-test textDisp-9.5 {TkTextRedrawTag} failsOnUbuntu {
+test textDisp-9.5 {TkTextRedrawTag} {failsOnUbuntu failsOnXQuarz} {
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap around\nLine 3\nLine 4"
@@ -1452,7 +1453,7 @@ test textDisp-11.1 {TkTextSetYView} {
updateText
.t index @0,0
} {30.0}
-test textDisp-11.2 {TkTextSetYView} {
+test textDisp-11.2 {TkTextSetYView} failsOnXQuarz {
.t yview 30.0
updateText
.t yview 32.0
@@ -1466,7 +1467,7 @@ test textDisp-11.3 {TkTextSetYView} {
updateText
list [.t index @0,0] $tk_textRedraw
} {28.0 {28.0 29.0}}
-test textDisp-11.4 {TkTextSetYView} {
+test textDisp-11.4 {TkTextSetYView} failsOnXQuarz {
.t yview 30.0
updateText
.t yview 31.4
@@ -1497,7 +1498,7 @@ test textDisp-11.7 {TkTextSetYView} {
updateText
list [.t index @0,0] $tk_textRedraw
} {21.0 {21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0}}
-test textDisp-11.8 {TkTextSetYView} {
+test textDisp-11.8 {TkTextSetYView} failsOnXQuarz {
.t yview 30.0
updateText
set tk_textRedraw {}
@@ -1505,7 +1506,7 @@ test textDisp-11.8 {TkTextSetYView} {
updateText
list [.t index @0,0] $tk_textRedraw
} {32.0 {40.0 41.0}}
-test textDisp-11.9 {TkTextSetYView} {
+test textDisp-11.9 {TkTextSetYView} failsOnXQuarz {
.t yview 30.0
updateText
set tk_textRedraw {}
@@ -1529,7 +1530,7 @@ test textDisp-11.11 {TkTextSetYView} {
updateText
list [.t index @0,0] $tk_textRedraw
} {191.0 {191.0 192.0 193.0 194.0 195.0 196.0}}
-test textDisp-11.12 {TkTextSetYView, wrapped line is off-screen} {
+test textDisp-11.12 {TkTextSetYView, wrapped line is off-screen} failsOnXQuarz {
.t insert 10.0 "Long line with enough text to wrap\n"
.t yview 1.0
updateText
@@ -2869,7 +2870,7 @@ test textDisp-19.16 {count -ypixels} {
[.t count -ypixels 16.0 "16.0 displaylineend +1c"] \
[.t count -ypixels "16.0 +1 displaylines" "16.0 +4 displaylines +3c"]
} [list [expr {260 + 20 * $fixedDiff}] [expr {260 + 20 * $fixedDiff}] $fixedHeight [expr {2*$fixedHeight}] $fixedHeight [expr {3*$fixedHeight}]]
-test textDisp-19.17 {count -ypixels with indices in elided lines} failsOnUbuntu {
+test textDisp-19.17 {count -ypixels with indices in elided lines} {failsOnUbuntu failsOnXQuarz} {
.t configure -wrap none
.t delete 1.0 end
for {set i 1} {$i < 100} {incr i} {
@@ -2896,7 +2897,7 @@ test textDisp-19.17 {count -ypixels with indices in elided lines} failsOnUbuntu
.t yview 35.0
lappend res [.t count -ypixels 5.0 25.0]
} [list [expr {4 * $fixedHeight}] [expr {3 * $fixedHeight}] 0 0 0 0 0 0 [expr {5 * $fixedHeight}] [expr {- 5 * $fixedHeight}] [expr {2 * $fixedHeight}] [expr {3 * $fixedHeight}] [expr {5 * $fixedHeight}]]
-test textDisp-19.18 {count -ypixels with indices in elided lines} failsOnUbuntu {
+test textDisp-19.18 {count -ypixels with indices in elided lines} {failsOnUbuntu failsOnXQuarz} {
.t configure -wrap none
.t delete 1.0 end
for {set i 1} {$i < 100} {incr i} {
@@ -3413,7 +3414,7 @@ test textDisp-24.24 {TkTextCharLayoutProc, justification and tabs} {textfonts} {
.t tag add x 1.0 end
list [.t bbox 1.0] [.t bbox 1.10]
} [list [list 45 3 7 $fixedHeight] [list 94 3 7 $fixedHeight]]
-test textDisp-24.25 {TkTextCharLayoutProc, justification and tabs} -constraints {textfonts} -setup {
+test textDisp-24.25 {TkTextCharLayoutProc, justification and tabs} -constraints {textfonts failsOnXQuarz} -setup {
text .tt -tabs {40 right} -wrap none -font $fixedFont
pack .tt
} -body {
diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test
index 5d00ccf..151ecf2 100644
--- a/tests/unixEmbed.test
+++ b/tests/unixEmbed.test
@@ -12,6 +12,7 @@ tcltest::loadTestedCommands
namespace import -force tcltest::test
testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
namespace eval ::_test_tmp {}
@@ -990,7 +991,7 @@ test unixEmbed-7.1 {TkpRedirectKeyEvent procedure, forward keystroke} -constrain
# TkpRedirectKeyEvent is not implemented in win or aqua. If someone
# implements it they should change the constraints for this test.
test unixEmbed-7.1a {TkpRedirectKeyEvent procedure, forward keystroke} -constraints {
- unix notAqua
+ unix notAqua failsOnXQuarz
} -setup {
deleteWindows
catch {interp delete child}
@@ -1088,7 +1089,7 @@ test unixEmbed-7.2a {TkpRedirectKeyEvent procedure, don't forward keystroke widt
} -result {{} {{key b}}}
test unixEmbed-8.1 {TkpClaimFocus procedure} -constraints {
- unix notAqua failsOnUbuntu
+ unix notAqua failsOnUbuntu failsOnXQuarz
} -setup {
deleteWindows
} -body {
@@ -1235,7 +1236,7 @@ test unixEmbed-9.2a {EmbedWindowDeleted procedure, check embeddedPtr} -constrain
test unixEmbed-10.1 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -constraints {
- unix failsOnUbuntu
+ unix failsOnUbuntu failsOnXQuarz
} -setup {
deleteWindows
} -body {
@@ -1251,7 +1252,7 @@ test unixEmbed-10.1 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -con
deleteWindows
} -result {150x80+0+0}
test unixEmbed-10.2 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -constraints {
- unix failsOnUbuntu
+ unix failsOnUbuntu failsOnXQuarz
} -setup {
deleteWindows
} -body {
diff --git a/tests/unixFont.test b/tests/unixFont.test
index 41afa6e..dacfd03 100644
--- a/tests/unixFont.test
+++ b/tests/unixFont.test
@@ -18,6 +18,7 @@ tcltest::loadTestedCommands
testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
testConstraint failsOnUbuntuNoXft [expr {[testConstraint failsOnUbuntu] || (![catch {tk::pkgconfig get fontsystem} fs] && ($fs eq "xft"))}]
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
if {[tk windowingsystem] eq "x11"} {
set xlsf [auto_execok xlsfonts]
@@ -256,7 +257,7 @@ test unixfont-8.3 {AllocFont procedure: can't parse info from name} x11 {
catch {unset fontArray}
set result
} {-family -overstrike -size -slant -underline -weight}
-test unixfont-8.4 {AllocFont procedure: classify characters} {x11 failsOnUbuntu} {
+test unixfont-8.4 {AllocFont procedure: classify characters} {x11 failsOnUbuntu failsOnXQuarz} {
set x 0
incr x [font measure $courier "\u4000"] ;# 6
incr x [font measure $courier "\002"] ;# 4
@@ -267,7 +268,7 @@ test unixfont-8.4 {AllocFont procedure: classify characters} {x11 failsOnUbuntu}
test unixfont-8.5 {AllocFont procedure: setup widths of normal chars} x11 {
font metrics $courier -fixed
} 1
-test unixfont-8.6 {AllocFont procedure: setup widths of special chars} {x11 failsOnUbuntu} {
+test unixfont-8.6 {AllocFont procedure: setup widths of special chars} {x11 failsOnUbuntu failsOnXQuarz} {
set x 0
incr x [font measure $courier "\001"] ;# 4
incr x [font measure $courier "\002"] ;# 4
@@ -295,7 +296,7 @@ test unixfont-8.11 {AllocFont procedure: XA_UNDERLINE_POSITION was 0} x11 {
set x {}
} {}
-test unixfont-9.1 {GetControlCharSubst procedure: 2 chars subst} {x11 failsOnUbuntu} {
+test unixfont-9.1 {GetControlCharSubst procedure: 2 chars subst} {x11 failsOnUbuntu failsOnXQuarz} {
.b.c dchars $t 0 end
.b.c insert $t 0 "0\a0"
set x {}
@@ -304,7 +305,7 @@ test unixfont-9.1 {GetControlCharSubst procedure: 2 chars subst} {x11 failsOnUbu
lappend x [.b.c index $t @[expr $ax*2],0]
lappend x [.b.c index $t @[expr $ax*3],0]
} {0 1 1 2}
-test unixfont-9.2 {GetControlCharSubst procedure: 4 chars subst} {x11 failsOnUbuntu} {
+test unixfont-9.2 {GetControlCharSubst procedure: 4 chars subst} {x11 failsOnUbuntu failsOnXQuarz} {
.b.c dchars $t 0 end
.b.c insert $t 0 "0\0010"
set x {}
diff --git a/tests/unixWm.test b/tests/unixWm.test
index b2b91b7..028c5be 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -14,6 +14,7 @@ tcltest::loadTestedCommands
namespace import -force ::tk::test:loadTkCommand
testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
proc sleep ms {
global x
@@ -1552,7 +1553,7 @@ test unixWm-44.6 {UpdateGeometryInfo procedure, negative height} unix {
} {100 1}
destroy .t
toplevel .t -width 80 -height 60
-test unixWm-44.7 {UpdateGeometryInfo procedure, computing position} unix {
+test unixWm-44.7 {UpdateGeometryInfo procedure, computing position} {unix failsOnXQuarz} {
tkwait visibility .t
wm overrideredirect .t 1
update
@@ -1562,7 +1563,7 @@ test unixWm-44.7 {UpdateGeometryInfo procedure, computing position} unix {
} [list 5 [expr [winfo screenheight .t] - 70]]
destroy .t
toplevel .t -width 80 -height 60
-test unixWm-44.8 {UpdateGeometryInfo procedure, computing position} unix {
+test unixWm-44.8 {UpdateGeometryInfo procedure, computing position} {unix failsOnXQuarz} {
tkwait visibility .t
wm overrideredirect .t 1
update
@@ -1612,7 +1613,7 @@ test unixWm-45.1 {UpdateSizeHints procedure, grid information} {unix testwrapper
[expr [lindex $property 7]] [expr [lindex $property 8]] \
[expr [lindex $property 9]] [expr [lindex $property 10]]
} {40 30 320 210 10 5}
-test unixWm-45.2 {UpdateSizeHints procedure} {unix testwrapper failsOnUbuntu} {
+test unixWm-45.2 {UpdateSizeHints procedure} {unix testwrapper failsOnUbuntu failsOnXQuarz} {
destroy .t
toplevel .t -width 80 -height 60
wm minsize .t 30 40
@@ -1640,7 +1641,7 @@ test unixWm-45.3 {UpdateSizeHints procedure, grid with menu} {testmenubar testwr
[expr [lindex $property 7]] [expr [lindex $property 8]] \
[expr [lindex $property 9]] [expr [lindex $property 10]]
} {60 40 53 320 233 10 5}
-test unixWm-45.4 {UpdateSizeHints procedure, not resizable with menu} {testmenubar testwrapper failsOnUbuntu} {
+test unixWm-45.4 {UpdateSizeHints procedure, not resizable with menu} {testmenubar testwrapper failsOnUbuntu failsOnXQuarz} {
destroy .t
toplevel .t -width 80 -height 60
frame .t.menu -height 23 -width 50
@@ -1794,7 +1795,7 @@ if {[tk windowingsystem] == "aqua"} {
# Windows are assumed to have a border (invisible in Gnome 3).
set result_50_1 {{} {} .t {} .t2 {} .t2 {} .t}
}
-test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords, title bar} {unix failsOnUbuntu} {
+test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords, title bar} {unix failsOnUbuntu failsOnXQuarz} {
update
toplevel .t -width 300 -height 400 -bg green
wm geom .t +100+100
@@ -2051,7 +2052,7 @@ test unixWm-51.6 {TkWmRestackToplevel procedure, window to be stacked isn't mapp
wm geometry .t2 +0+0
winfo containing 100 100
} {.t}
-test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} unix {
+test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} {unix failsOnXQuarz} {
foreach w {.t .t2 .t3} {
destroy $w
update
diff --git a/tests/winfo.test b/tests/winfo.test
index 13193ef..a247346 100644
--- a/tests/winfo.test
+++ b/tests/winfo.test
@@ -12,6 +12,7 @@ tcltest::configure {*}$argv
tcltest::loadTestedCommands
testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# eatColors --
# Creates a toplevel window and allocates enough colors in it to
@@ -322,7 +323,7 @@ test winfo-9.6 {"winfo viewable" command} -setup {
} -cleanup {
deleteWindows
} -result {0 0}
-test winfo-9.7 {"winfo viewable" command} -constraints failsOnUbuntu -setup {
+test winfo-9.7 {"winfo viewable" command} -constraints {failsOnUbuntu failsOnXQuarz} -setup {
deleteWindows
} -body {
frame .f1 -width 100 -height 100 -relief raised -bd 2
diff --git a/tests/wm.test b/tests/wm.test
index d5bc733..c1e6cba 100644
--- a/tests/wm.test
+++ b/tests/wm.test
@@ -28,6 +28,7 @@ proc stdWindow {} {
}
testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# [raise] and [lower] may return before the window manager has completed the
# operation. The raiseDelay procedure idles for a while to give the operation
@@ -1527,7 +1528,7 @@ test wm-stackorder-5.1 {a menu is not a toplevel} -body {
destroy .t
} -result {.t .}
test wm-stackorder-5.2 {A normal toplevel can't be raised above an \
- overrideredirect toplevel on unix} -constraints {x11 failsOnUbuntu} -body {
+ overrideredirect toplevel on unix} -constraints {x11 failsOnUbuntu failsOnXQuarz} -body {
toplevel .t
tkwait visibility .t
wm overrideredirect .t 1
@@ -1551,7 +1552,7 @@ test wm-stackorder-5.2.1 {A normal toplevel can be raised above an \
destroy .t
} -result 1
test wm-stackorder-5.3 {An overrideredirect window\
- can be explicitly lowered} -body {
+ can be explicitly lowered} -constraints failsOnXQuarz -body {
toplevel .t
tkwait visibility .t
wm overrideredirect .t 1
@@ -1726,7 +1727,7 @@ test wm-transient-3.3 {withdraw/deiconify on the toplevel
} -result {withdrawn 0 normal 1}
test wm-transient-4.1 {transient toplevel is withdrawn
- when mapped if toplevel is iconic} -constraints failsOnUbuntu -body {
+ when mapped if toplevel is iconic} -constraints {failsOnUbuntu failsOnXQuarz} -body {
toplevel .top
wm iconify .top
update
@@ -1928,7 +1929,7 @@ test wm-transient-7.5 {Reassign transient, destroy transient} -body {
deleteWindows
}
-test wm-transient-8.1 {transient to withdrawn window, Bug 1163496} -constraints failsOnUbuntu -setup {
+test wm-transient-8.1 {transient to withdrawn window, Bug 1163496} -constraints {failsOnUbuntu failsOnXQuarz} -setup {
deleteWindows
set result {}
} -body {
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index 400e610..60da06b 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -705,7 +705,7 @@ TkpGetNativeFont(
if (name[0] == '-') {
if (name[1] != '*') {
- char *dash;
+ const char *dash;
dash = strchr(name + 1, '-');
if ((dash == NULL) || (isspace(UCHAR(dash[-1])))) {
@@ -1713,7 +1713,7 @@ InitFont(
* 1/3 the width of a capital I.
*/
- fontPtr->barHeight = fontPtr->widths['I'] / 3;
+ fontPtr->barHeight = fontPtr->widths[(unsigned char)'I'] / 3;
if (fontPtr->barHeight == 0) {
fontPtr->barHeight = 1;
}
@@ -2109,10 +2109,10 @@ FindSubFontForChar(
nameList = ListFonts(fontPtr->display, "*", &numNames);
for (i = 0; i < numNames; i++) {
- fallback = strchr(nameList[i] + 1, '-') + 1;
- strchr(fallback, '-')[0] = '\0';
- if (SeenName(fallback, &ds) == 0) {
- subFontPtr = CanUseFallback(fontPtr, fallback, ch,
+ char *fallbck = strchr(nameList[i] + 1, '-') + 1;
+ strchr(fallbck, '-')[0] = '\0';
+ if (SeenName(fallbck, &ds) == 0) {
+ subFontPtr = CanUseFallback(fontPtr, fallbck, ch,
fixSubFontPtrPtr);
if (subFontPtr != NULL) {
XFreeFontNames(nameList);