diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-01-22 11:08:01 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-01-22 11:08:01 (GMT) |
commit | f31f7c15c932ef82b7ea1ce4df7b3a1436118d62 (patch) | |
tree | 4769a78148772f932274d91d7596414d2fa5e33c | |
parent | 617afea2de833e496113d4698a66a470fe2d0b43 (diff) | |
download | tk-f31f7c15c932ef82b7ea1ce4df7b3a1436118d62.zip tk-f31f7c15c932ef82b7ea1ce4df7b3a1436118d62.tar.gz tk-f31f7c15c932ef82b7ea1ce4df7b3a1436118d62.tar.bz2 |
Mark testcases which fail on XQuarz
-rw-r--r-- | .github/workflows/mac-build.yml | 4 | ||||
-rw-r--r-- | tests/clrpick.test | 4 | ||||
-rw-r--r-- | tests/focus.test | 3 | ||||
-rw-r--r-- | tests/listbox.test | 34 | ||||
-rw-r--r-- | tests/pack.test | 5 | ||||
-rw-r--r-- | tests/place.test | 7 | ||||
-rw-r--r-- | tests/scrollbar.test | 14 | ||||
-rw-r--r-- | tests/textDisp.test | 8 | ||||
-rw-r--r-- | tests/unixFont.test | 10 | ||||
-rw-r--r-- | tests/unixWm.test | 21 | ||||
-rw-r--r-- | tests/winWm.test | 4 | ||||
-rw-r--r-- | tests/winfo.test | 6 | ||||
-rw-r--r-- | tests/wm.test | 17 |
13 files changed, 78 insertions, 59 deletions
diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 07ef4c2..70d31f2 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -27,8 +27,8 @@ jobs: env: USE_XVFB: ${{ contains(matrix.options, '--disable-aqua') }} - name: Add Tcl - run: | - brew install tcl-tk + run: | + brew install tcl-tk - name: Add X11 if: ${{ env.USE_XVFB }} # This involves black magic diff --git a/tests/clrpick.test b/tests/clrpick.test index 2fa8c36..61d69bd 100644 --- a/tests/clrpick.test +++ b/tests/clrpick.test @@ -9,6 +9,8 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint failsOnQuarz [expr {![info exists ::env(MAC_CI)]}] + if {[testConstraint defaultPseudocolor8]} { # let's soak up a bunch of colors...so that # machines with small color palettes still fail. @@ -168,7 +170,7 @@ test clrpick-2.2 {tk_chooseColor command} \ tk_chooseColor -parent $parent -title "choose $colors" } "$color" test clrpick-2.3 {tk_chooseColor command} \ - {nonUnixUserInteraction colorsLeftover} { + {nonUnixUserInteraction colorsLeftover failsOnQuarz} { ToPressButton $parent ok tk_chooseColor -parent $parent -title "Press OK" } "$color" diff --git a/tests/focus.test b/tests/focus.test index 7a35aa4..5aad728 100644 --- a/tests/focus.test +++ b/tests/focus.test @@ -14,6 +14,7 @@ button .b -text .b -relief raised -bd 2 pack .b testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] +testConstraint failsOnQuarz [expr {![info exists ::env(MAC_CI)]}] proc focusSetup {} { catch {destroy .t} @@ -513,7 +514,7 @@ test focus-4.4 {TkFocusDeadWindow procedure} {unix testwrapper} { setupbg test focus-5.1 {ChangeXFocus procedure, don't take focus unless have it} \ - {unix testwrapper secureserver failsOnUbuntu} { + {unix testwrapper secureserver failsOnUbuntu failsOnQuarz} { focusSetup focus -force .t update diff --git a/tests/listbox.test b/tests/listbox.test index f3dfd76..f65cf06 100644 --- a/tests/listbox.test +++ b/tests/listbox.test @@ -10,6 +10,8 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint failsOnQuarz [expr {![info exists ::env(MAC_CI)]}] + set fixed {Courier -12} proc record {name args} { @@ -206,7 +208,7 @@ test listbox-3.16 {ListboxWidgetCmd procedure, "bbox" option} {fonts} { update list [.l bbox 17] [.l bbox end] [.l bbox 18] } {{7 83 24 14} {7 83 24 14} {}} -test listbox-3.17 {ListboxWidgetCmd procedure, "bbox" option} {fonts} { +test listbox-3.17 {ListboxWidgetCmd procedure, "bbox" option} {fonts failsOnQuarz} { catch {destroy .t} toplevel .t wm geom .t +0+0 @@ -217,7 +219,7 @@ test listbox-3.17 {ListboxWidgetCmd procedure, "bbox" option} {fonts} { .t.l xview moveto .2 .t.l bbox 2 } {-72 39 393 14} -test listbox-3.18 {ListboxWidgetCmd procedure, "bbox" option, partial last line} {fonts} { +test listbox-3.18 {ListboxWidgetCmd procedure, "bbox" option, partial last line} {fonts failsOnQuarz} { mkPartial list [.partial.l bbox 3] [.partial.l bbox 4] } {{5 56 24 14} {5 73 23 14}} @@ -463,7 +465,7 @@ test listbox-3.76 {ListboxWidgetCmd procedure, "scan" option} { test listbox-3.77 {ListboxWidgetCmd procedure, "scan" option} { list [catch {.l scan foo 2 2.3} msg] $msg } {1 {expected integer but got "2.3"}} -test listbox-3.78 {ListboxWidgetCmd procedure, "scan" option} {fonts} { +test listbox-3.78 {ListboxWidgetCmd procedure, "scan" option} {fonts failsOnQuarz} { catch {destroy .t} toplevel .t wm geom .t +0+0 @@ -754,7 +756,7 @@ test listbox-3.137 {ListboxWidgetCmd procedure, "xview" option} { # No tests for DestroyListbox: I can't come up with anything to test # in this procedure. -test listbox-4.1 {ConfigureListbox procedure} {fonts} { +test listbox-4.1 {ConfigureListbox procedure} {fonts failsOnQuarz} { catch {destroy .l} listbox .l -setgrid 1 -width 25 -height 15 pack .l @@ -812,7 +814,7 @@ test listbox-4.5 {-exportselection option} { } {0 el1 1 1 {PRIMARY selection doesn't exist or form "STRING" not defined} 1 1 {PRIMARY selection doesn't exist or form "STRING" not defined} {} 1 {PRIMARY selection doesn't exist or form "STRING" not defined} {1 2 3} 0 {el1 el2 el3} {1 2 3}} -test listbox-4.6 {ConfigureListbox procedure} {fonts} { +test listbox-4.6 {ConfigureListbox procedure} {fonts failsOnQuarz} { catch {destroy .l} # The following code (reset geometry, withdraw, etc.) is necessary @@ -951,20 +953,20 @@ test listbox-4.19 {ConfigureListbox, no listvar -> bad non-existent listvar} { # No tests for DisplayListbox: I don't know how to test this procedure. -test listbox-5.1 {ListboxComputeGeometry procedure} {fonts} { +test listbox-5.1 {ListboxComputeGeometry procedure} {fonts failsOnQuarz} { catch {destroy .l} listbox .l -font $fixed -width 15 -height 20 pack .l list [winfo reqwidth .l] [winfo reqheight .l] } {115 328} -test listbox-5.2 {ListboxComputeGeometry procedure} {fonts} { +test listbox-5.2 {ListboxComputeGeometry procedure} {fonts failsOnQuarz} { catch {destroy .l} listbox .l -font $fixed -width 0 -height 10 pack .l update list [winfo reqwidth .l] [winfo reqheight .l] } {17 168} -test listbox-5.3 {ListboxComputeGeometry procedure} {fonts} { +test listbox-5.3 {ListboxComputeGeometry procedure} {fonts failsOnQuarz} { catch {destroy .l} listbox .l -font $fixed -width 0 -height 10 -bd 3 .l insert 0 Short "Really much longer" Longer @@ -972,14 +974,14 @@ test listbox-5.3 {ListboxComputeGeometry procedure} {fonts} { update list [winfo reqwidth .l] [winfo reqheight .l] } {138 170} -test listbox-5.4 {ListboxComputeGeometry procedure} {fonts} { +test listbox-5.4 {ListboxComputeGeometry procedure} {fonts failsOnQuarz} { catch {destroy .l} listbox .l -font $fixed -width 10 -height 0 pack .l update list [winfo reqwidth .l] [winfo reqheight .l] } {80 24} -test listbox-5.5 {ListboxComputeGeometry procedure} {fonts} { +test listbox-5.5 {ListboxComputeGeometry procedure} {fonts failsOnQuarz} { catch {destroy .l} listbox .l -font $fixed -width 10 -height 0 -highlightthickness 0 .l insert 0 Short "Really much longer" Longer @@ -1080,7 +1082,7 @@ test listbox-6.11 {InsertEls procedure} { update set log } {{y 0 0.166667} {x 0 1}} -test listbox-6.12 {InsertEls procedure} {fonts} { +test listbox-6.12 {InsertEls procedure} {fonts failsOnQuarz} { catch {destroy .l2} listbox .l2 -width 0 -height 0 pack .l2 -side top @@ -1263,7 +1265,7 @@ test listbox-7.19 {DeleteEls procedure} { update set log } {{y 0 0.2} {x 0 1}} -test listbox-7.20 {DeleteEls procedure} {fonts} { +test listbox-7.20 {DeleteEls procedure} {fonts failsOnQuarz} { catch {destroy .l2} listbox .l2 -width 0 -height 0 pack .l2 -side top @@ -1282,7 +1284,7 @@ test listbox-7.21 {DeleteEls procedure, check -listvar update} { set x } [list c d] -test listbox-8.1 {ListboxEventProc procedure} {fonts} { +test listbox-8.1 {ListboxEventProc procedure} {fonts failsOnQuarz} { catch {destroy .l} listbox .l -setgrid 1 pack .l @@ -1292,7 +1294,7 @@ test listbox-8.1 {ListboxEventProc procedure} {fonts} { list $x [getsize .] [winfo exists .l] [info command .l] } {20x10 150x178 0 {}} resetGridInfo -test listbox-8.2 {ListboxEventProc procedure} {fonts} { +test listbox-8.2 {ListboxEventProc procedure} {fonts failsOnQuarz} { catch {destroy .l} listbox .l -height 5 -width 10 .l insert 0 a b c "A string that is very very long" d e f g h i j k @@ -1319,7 +1321,7 @@ test listbox-9.1 {ListboxCmdDeletedProc procedure} { rename .l1 {} list [info command .l*] [winfo children .] } {{} {}} -test listbox-9.2 {ListboxCmdDeletedProc procedure, disabling -setgrid} fonts { +test listbox-9.2 {ListboxCmdDeletedProc procedure, disabling -setgrid} {fonts failsOnQuarz} { catch {destroy .top} toplevel .top wm geom .top +0+0 @@ -1552,7 +1554,7 @@ update test listbox-14.2 {NearestListboxElement procedure} {fonts} { .l index @50,0 } {4} -test listbox-14.3 {NearestListboxElement procedure} {fonts} { +test listbox-14.3 {NearestListboxElement procedure} {fonts failsOnQuarz} { list [.l index @50,35] [.l index @50,36] } {5 6} test listbox-14.4 {NearestListboxElement procedure} {fonts} { diff --git a/tests/pack.test b/tests/pack.test index b75d5b2..5f9061e 100644 --- a/tests/pack.test +++ b/tests/pack.test @@ -11,6 +11,7 @@ eval tcltest::configure $argv tcltest::loadTestedCommands testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] +testConstraint failsOnQuarz [expr {![info exists ::env(MAC_CI)]}] # Utility procedures: @@ -1013,7 +1014,7 @@ test pack-17.1 {PackLostSlaveProc procedure} { [catch {pack info .pack.a} msg] $msg } {place 20x40+40+10 1 {window ".pack.a" isn't packed}} -test pack-18.1 {unmap slaves when master unmapped} {tempNotPc failsOnUbuntu} { +test pack-18.1 {unmap slaves when master unmapped} {tempNotPc failsOnUbuntu failsOnQuarz} { # adjust the position of .pack before test to avoid a screen switch # that occurs with window managers that have desktops four times as big @@ -1041,7 +1042,7 @@ test pack-18.1 {unmap slaves when master unmapped} {tempNotPc failsOnUbuntu} { update lappend result [winfo ismapped .pack.a] } {1 0 200 75 0 1} -test pack-18.2 {unmap slaves when master unmapped} failsOnUbuntu { +test pack-18.2 {unmap slaves when master unmapped} {failsOnUbuntu failsOnQuarz} { # adjust the position of .pack before test to avoid a screen switch # that occurs with window managers that have desktops four times as big diff --git a/tests/place.test b/tests/place.test index 07524fe..d792436 100644 --- a/tests/place.test +++ b/tests/place.test @@ -12,6 +12,7 @@ tcltest::loadTestedCommands # Used for constraining memory leak tests testConstraint memory [llength [info commands memory]] testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] +testConstraint failsOnQuarz [expr {![info exists ::env(MAC_CI)]}] # XXX - This test file is woefully incomplete. At present, only a # few of the features are tested. @@ -198,7 +199,7 @@ test place-7.10 {ReconfigurePlacement procedure, computing size} { } {30 60} -test place-8.1 {MasterStructureProc, mapping and unmapping slaves} failsOnUbuntu { +test place-8.1 {MasterStructureProc, mapping and unmapping slaves} {failsOnUbuntu failsOnQuarz} { place forget .t.f2 place forget .t.f place .t.f2 -relx 1.0 -rely 1.0 -anchor sw @@ -214,7 +215,7 @@ test place-8.1 {MasterStructureProc, mapping and unmapping slaves} failsOnUbuntu update lappend result [winfo ismapped .t.f2] } {1 0 40 30 0 1} -test place-8.2 {MasterStructureProc, mapping and unmapping slaves} failsOnUbuntu { +test place-8.2 {MasterStructureProc, mapping and unmapping slaves} {failsOnUbuntu failsOnQuarz} { place forget .t.f2 place forget .t.f place .t.f -x 0 -y 0 -width 200 -height 100 @@ -401,7 +402,7 @@ test place-14.1 {memory leak testing} -setup { } return $res } -} -constraints memory -body { +} -constraints {memory failsOnQuarz} -body { # Test all manners of forgetting a slave frame .f frame .f.f diff --git a/tests/scrollbar.test b/tests/scrollbar.test index 5de464d..aead7b6 100644 --- a/tests/scrollbar.test +++ b/tests/scrollbar.test @@ -11,6 +11,8 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint failsOnQuarz [expr {![info exists ::env(MAC_CI)]}] + proc scroll args { global scrollInfo set scrollInfo $args @@ -257,13 +259,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} {unix failsOnUbuntu} { +test scrollbar-3.36 {ScrollbarWidgetCmd procedure, "fraction" option} {unix failsOnUbuntu failsOnQuarz} { 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} {unix failsOnUbuntu} { +test scrollbar-3.38 {ScrollbarWidgetCmd procedure, "fraction" option} {unix failsOnUbuntu failsOnQuarz} { format {%.6g} [.s fraction 4 178] } {0.993711} test scrollbar-3.39 {ScrollbarWidgetCmd procedure, "fraction" option} {testmetrics win} { @@ -460,7 +462,7 @@ test scrollbar-6.10 {ScrollbarPosition procedure} { test scrollbar-6.11 {ScrollbarPosition procedure} unix { .s identify 8 4 } {arrow1} -test scrollbar-6.12 {ScrollbarPosition procedure} {unix failsOnUbuntu} { +test scrollbar-6.12 {ScrollbarPosition procedure} {unix failsOnUbuntu failsOnQuarz} { .s identify 8 19 } {arrow1} test scrollbar-6.14 {ScrollbarPosition procedure} win { @@ -518,7 +520,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 {ScrollbarPosition procedure} {unix failsOnUbuntu} { +test scrollbar-6.29 {ScrollbarPosition procedure} {unix failsOnUbuntu failsOnQuarz} { .s identify 8 180 } {arrow2} test scrollbar-6.30 {ScrollbarPosition procedure} unix { @@ -534,7 +536,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 failsOnQuarz} { .s identify 18 100 } {trough2} test scrollbar-6.37 {ScrollbarPosition procedure} win { @@ -565,7 +567,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 failsOnQuarz} { .t.s identify 100 18 } {trough2} test scrollbar-6.45 {ScrollbarPosition procedure} win { diff --git a/tests/textDisp.test b/tests/textDisp.test index 8285fa8..e043c40 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -11,6 +11,8 @@ eval tcltest::configure $argv tcltest::loadTestedCommands namespace import -force tcltest::test +testConstraint failsOnQuarz [expr {![info exists ::env(MAC_CI)]}] + # The procedure below is used as the scrolling command for the text; # it just saves the scrolling information in a variable "scrollInfo". @@ -2808,7 +2810,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 failsOnQuarz} { .t configure -wrap none .t delete 1.0 end for {set i 1} {$i < 100} {incr i} { @@ -2835,7 +2837,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 failsOnQuarz} { .t configure -wrap none .t delete 1.0 end for {set i 1} {$i < 100} {incr i} { @@ -3588,7 +3590,7 @@ test textDisp-27.6 {SizeOfTab procedure, center alignment} {textfonts} { .t tag add x 1.0 end list [.t bbox 1.6] [.t bbox 1.7] } [list [list 32 [expr {$fixedDiff + 18}] 7 $fixedHeight] [list 39 [expr {$fixedDiff + 18}] 7 $fixedHeight]] -test textDisp-27.7 {SizeOfTab procedure, center alignment, wrap -none (potential numerical problems)} {textfonts} { +test textDisp-27.7 {SizeOfTab procedure, center alignment, wrap -none (potential numerical problems)} {textfonts failsOnQuarz} { .t delete 1.0 end set cm [winfo fpixels .t 1c] .t configure -tabs {1c 2c center 3c 4c 5c 6c 7c 8c} -wrap none -width 40 diff --git a/tests/unixFont.test b/tests/unixFont.test index 5c22e3a..ca96492 100644 --- a/tests/unixFont.test +++ b/tests/unixFont.test @@ -16,6 +16,8 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint failsOnQuarz [expr {![info exists ::env(MAC_CI)]}] + if {[tk windowingsystem] eq "x11"} { set xlsf [auto_execok xlsfonts] } @@ -255,7 +257,7 @@ test unixfont-8.3 {AllocFont procedure: can't parse info from name} unix { catch {unset fontArray} set result } {-family -overstrike -size -slant -underline -weight} -test unixfont-8.4 {AllocFont procedure: classify characters} {unix failsOnUbuntu} { +test unixfont-8.4 {AllocFont procedure: classify characters} {unix failsOnUbuntu failsOnQuarz} { set x 0 incr x [font measure $courier "\u4000"] ;# 6 incr x [font measure $courier "\002"] ;# 4 @@ -266,7 +268,7 @@ test unixfont-8.4 {AllocFont procedure: classify characters} {unix failsOnUbuntu test unixfont-8.5 {AllocFont procedure: setup widths of normal chars} unix { font metrics $courier -fixed } {1} -test unixfont-8.6 {AllocFont procedure: setup widths of special chars} {unix failsOnUbuntu} { +test unixfont-8.6 {AllocFont procedure: setup widths of special chars} {unix failsOnUbuntu failsOnQuarz} { set x 0 incr x [font measure $courier "\001"] ;# 4 incr x [font measure $courier "\002"] ;# 4 @@ -294,7 +296,7 @@ test unixfont-8.11 {AllocFont procedure: XA_UNDERLINE_POSITION was 0} unix { set x {} } {} -test unixfont-9.1 {GetControlCharSubst procedure: 2 chars subst} {unix failsOnUbuntu} { +test unixfont-9.1 {GetControlCharSubst procedure: 2 chars subst} {unix failsOnUbuntu failsOnQuarz} { .b.c dchars $t 0 end .b.c insert $t 0 "0\a0" set x {} @@ -303,7 +305,7 @@ test unixfont-9.1 {GetControlCharSubst procedure: 2 chars subst} {unix failsOnUb 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} {unix failsOnUbuntu} { +test unixfont-9.2 {GetControlCharSubst procedure: 4 chars subst} {unix failsOnUbuntu failsOnQuarz} { .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 48f3e47..8943790 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(CI)] || ![string match Linux $::tcl_platform(os)]}] +testConstraint failsOnQuarz [expr {![info exists ::env(MAC_CI)]}] proc sleep ms { global x @@ -271,7 +272,7 @@ test unixWm-8.3 {icon windows} unix { toplevel .t -width 100 -height 30 list [catch {wm iconwindow .t b c} msg] $msg } {1 {wrong # args: should be "wm iconwindow window ?pathName?"}} -test unixWm-8.4 {icon windows} {unix failsOnUbuntu} { +test unixWm-8.4 {icon windows} {unix failsOnUbuntu failsOnQuarz} { destroy .t destroy .icon toplevel .t -width 100 -height 30 @@ -390,7 +391,7 @@ test unixWm-9.2 {TkWmMapWindow procedure, command property} {unix testwrapper} { } {test command } -test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} {unix failsOnUbuntu} { +test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} {unix failsOnUbuntu failsOnQuarz} { destroy .t toplevel .t -width 100 -height 300 -bg blue wm geom .t +0+0 @@ -617,7 +618,7 @@ test unixWm-16.2 {Tk_WmCmd procedure, "deiconify" option} unix { destroy .icon set result } {1 {can't deiconify .icon: it is an icon for .t}} -test unixWm-16.3 {Tk_WmCmd procedure, "deiconify" option} {unix failsOnUbuntu} { +test unixWm-16.3 {Tk_WmCmd procedure, "deiconify" option} {unix failsOnUbuntu failsOnQuarz} { wm iconify .t set result {} lappend result [winfo ismapped .t] [wm state .t] @@ -830,7 +831,7 @@ test unixWm-23.4 {Tk_WmCmd procedure, "iconify" option} unix { destroy .t2 set result } {1 {can't iconify .t2: it is an icon for .t}} -test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} {unix failsOnUbuntu} { +test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} {unix failsOnUbuntu failsOnQuarz} { destroy .t2 toplevel .t2 wm geom .t2 +0+0 @@ -841,7 +842,7 @@ test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} {unix failsOnUbuntu} { destroy .t2 set result } {0} -test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} {unix failsOnUbuntu} { +test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} {unix failsOnUbuntu failsOnQuarz} { destroy .t2 toplevel .t2 wm geom .t2 -0+0 @@ -1407,7 +1408,7 @@ test unixWm-41.4 {ConfigureEvent procedure, synthesized Configure events} unix { # No tests for ReparentEvent or ComputeReparentGeometry; I can't figure # out how to exercise these procedures reliably. -test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} {unix failsOnUbuntu} { +test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} {unix failsOnUbuntu failsOnQuarz} { destroy .t toplevel .t -width 400 -height 150 wm geometry .t +0+0 @@ -1580,7 +1581,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 failsOnQuarz} { destroy .t toplevel .t -width 80 -height 60 wm minsize .t 30 40 @@ -1608,7 +1609,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 failsOnQuarz} { destroy .t toplevel .t -width 80 -height 60 frame .t.menu -height 23 -width 50 @@ -1755,7 +1756,7 @@ test unixWm-49.2 {Tk_GetRootCoords procedure, menubars} {unix testmenubar} { deleteWindows wm iconify . -test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords} {unix failsOnUbuntu} { +test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords} {unix failsOnUbuntu failsOnQuarz} { deleteWindows toplevel .t -width 300 -height 400 -bg green wm geom .t +40+0 @@ -1912,7 +1913,7 @@ test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} unix { [winfo containing [expr $x + 350] $y] \ [winfo containing [expr $x + 450] $y] } {.t .t.f .t.f.f .t {}} -test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} {unix failsOnUbuntu} { +test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} {unix failsOnUbuntu failsOnQuarz} { destroy .t destroy .t2 sleep 500 ;# Give window manager time to catch up. diff --git a/tests/winWm.test b/tests/winWm.test index ab99b48..10e5ada 100644 --- a/tests/winWm.test +++ b/tests/winWm.test @@ -13,6 +13,8 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint failsOnQuarz [expr {![info exists ::env(MAC_CI)]}] + # Measure the height of a single menu line toplevel .t @@ -507,7 +509,7 @@ test winWm-9.1 "delayed activation of grabbed destroyed window" -constraints win destroy .tx .t .sd } -result ok -test winWm-9.2 "check wm forget for unmapped parent (#3205464,#2967911)" -constraints failsOnUbuntu -setup { +test winWm-9.2 "check wm forget for unmapped parent (#3205464,#2967911)" -constraints {failsOnUbuntu failsOnQuarz} -setup { destroy .t toplevel .t set winwm92 {} diff --git a/tests/winfo.test b/tests/winfo.test index ff7f23d..96740e7 100644 --- a/tests/winfo.test +++ b/tests/winfo.test @@ -10,6 +10,8 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint failsOnQuarz [expr {![info exists ::env(MAC_CI)]}] + # eatColors -- # Creates a toplevel window and allocates enough colors in it to # use up all the slots in the colormap. @@ -220,7 +222,7 @@ test winfo-9.2 {"winfo viewable" command} { test winfo-9.3 {"winfo viewable" command} { winfo viewable . } {1} -test winfo-9.4 {"winfo viewable" command} failsOnUbuntu { +test winfo-9.4 {"winfo viewable" command} {failsOnUbuntu failsOnQuarz} { wm iconify . winfo viewable . } {0} @@ -241,7 +243,7 @@ test winfo-9.6 {"winfo viewable" command} { update list [winfo viewable .f1] [winfo viewable .f1.f2] } {0 0} -test winfo-9.7 {"winfo viewable" command} failsOnUbuntu { +test winfo-9.7 {"winfo viewable" command} {failsOnUbuntu failsOnQuarz} { deleteWindows frame .f1 -width 100 -height 100 -relief raised -bd 2 place .f1 -x 0 -y 0 diff --git a/tests/wm.test b/tests/wm.test index ab2a7cc..a32ae73 100644 --- a/tests/wm.test +++ b/tests/wm.test @@ -28,6 +28,7 @@ proc stdWindow {} { } testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] +testConstraint failsOnQuarz [expr {![info exists ::env(MAC_CI)]}] # [raise] and [lower] may return before the window manager has completed the # operation. The raiseDelay procedure idles for a while to give the operation @@ -807,7 +808,7 @@ test wm-iconify-2.4.2 {Misc errors} -constraints !win -setup { destroy .t2 .r.f } -result {can't iconify .t2: it is an embedded window} -test wm-iconify-3.1 {iconify behavior} -constraints failsOnUbuntu -body { +test wm-iconify-3.1 {iconify behavior} -constraints {failsOnUbuntu failsOnQuarz} -body { toplevel .t2 wm geom .t2 -0+0 update @@ -1406,7 +1407,7 @@ test wm-stackorder-2.7 {stacking order: no children returns self} -setup { deleteWindows -test wm-stackorder-3.1 {unmapped toplevel} -constraints failsOnUbuntu -body { +test wm-stackorder-3.1 {unmapped toplevel} -constraints {failsOnUbuntu failsOnQuarz} -body { toplevel .t1 ; update toplevel .t2 ; update wm iconify .t1 @@ -1692,7 +1693,7 @@ test wm-transient-3.3 {withdraw/deiconify on the master } -result {withdrawn 0 normal 1} test wm-transient-4.1 {transient toplevel is withdrawn - when mapped if master is iconic} -constraints failsOnUbuntu -body { + when mapped if master is iconic} -constraints {failsOnUbuntu failsOnQuarz} -body { toplevel .master wm iconify .master update @@ -1704,7 +1705,7 @@ test wm-transient-4.1 {transient toplevel is withdrawn deleteWindows } -result {withdrawn 0} test wm-transient-4.2 {already mapped transient toplevel - is withdrawn if master is iconic} -constraints failsOnUbuntu -body { + is withdrawn if master is iconic} -constraints {failsOnUbuntu failsOnQuarz} -body { toplevel .master wm iconify .master update @@ -1717,7 +1718,7 @@ test wm-transient-4.2 {already mapped transient toplevel deleteWindows } -result {withdrawn 0} test wm-transient-4.3 {iconify/deiconify on the master - does a withdraw/deiconify on the transient} -constraints failsOnUbuntu -setup { + does a withdraw/deiconify on the transient} -constraints {failsOnUbuntu failsOnQuarz} -setup { set results [list] } -body { toplevel .master @@ -1893,7 +1894,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 failsOnQuarz} -setup { deleteWindows set result {} } -body { @@ -1970,7 +1971,7 @@ test wm-state-2.7 {state change before map} -body { } -cleanup { deleteWindows } -result {iconic} -test wm-state-2.8 {state change after map} -constraints failsOnUbuntu -body { +test wm-state-2.8 {state change after map} -constraints {failsOnUbuntu failsOnQuarz} -body { toplevel .t update wm state .t iconic @@ -1978,7 +1979,7 @@ test wm-state-2.8 {state change after map} -constraints failsOnUbuntu -body { } -cleanup { deleteWindows } -result {iconic} -test wm-state-2.9 {state change after map} -constraints failsOnUbuntu -body { +test wm-state-2.9 {state change after map} -constraints {failsOnUbuntu failsOnQuarz} -body { toplevel .t update wm iconify .t |