From a22fd911c4fcdbc6c92423c582245a607610456c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 29 Sep 2020 10:05:00 +0000 Subject: Mark more test-cases with "failsOnUbuntu" --- tests/bell.test | 2 +- tests/bitmap.test | 6 ++--- tests/border.test | 22 ++++++++-------- tests/clipboard.test | 2 +- tests/cmds.test | 2 +- tests/imgPhoto.test | 2 +- tests/main.test | 2 +- tests/menu.test | 72 +++++++++++++++++++++++++-------------------------- tests/menuDraw.test | 12 ++++----- tests/menubut.test | 18 ++++++------- tests/scale.test | 2 +- tests/scrollbar.test | 14 +++++----- tests/select.test | 8 +++--- tests/textDisp.test | 12 +++++---- tests/textWind.test | 4 ++- tests/unixButton.test | 16 ++++++------ tests/unixEmbed.test | 24 +++++++++-------- tests/unixFont.test | 30 +++++++++++---------- tests/unixWm.test | 20 +++++++------- tests/visual_bb.test | 12 ++++----- tests/winDialog.test | 12 ++++----- tests/winFont.test | 22 ++++++++-------- tests/winMenu.test | 6 ++--- tests/winfo.test | 6 +++-- tests/wm.test | 6 ++--- 25 files changed, 174 insertions(+), 160 deletions(-) diff --git a/tests/bell.test b/tests/bell.test index 4f7df97..bbafeac 100644 --- a/tests/bell.test +++ b/tests/bell.test @@ -15,7 +15,7 @@ test bell-1.1 {bell command} -body { } -returnCodes {error} -result {bad option "a": must be -displayof or -nice} test bell-1.2 {bell command} -body { - bell a b + bell a b } -returnCodes {error} -result {bad option "a": must be -displayof or -nice} test bell-1.3 {bell command} -body { diff --git a/tests/bitmap.test b/tests/bitmap.test index fea675d..6996f88 100644 --- a/tests/bitmap.test +++ b/tests/bitmap.test @@ -15,7 +15,7 @@ test bitmap-1.1 {Tk_AllocBitmapFromObj - converting internal reps} -constraints testbitmap } -body { set x gray25 - lindex $x 0 + lindex $x 0 button .b -bitmap $x lindex $x 0 testbitmap gray25 @@ -54,12 +54,12 @@ test bitmap-1.3 {Tk_AllocBitmapFromObj - reuse existing bitmap} -constraints { test bitmap-2.1 {Tk_GetBitmap procedure} -body { button .b1 -bitmap bad_name } -cleanup { - destroy .b1 + destroy .b1 } -returnCodes error -result {bitmap "bad_name" not defined} test bitmap-2.2 {Tk_GetBitmap procedure} -body { button .b1 -bitmap @xyzzy } -cleanup { - destroy .b1 + destroy .b1 } -returnCodes error -result {error reading bitmap file "xyzzy"} test bitmap-3.1 {Tk_FreeBitmapFromObj - reference counts} -constraints { diff --git a/tests/border.test b/tests/border.test index f610ad8..e13d52a 100644 --- a/tests/border.test +++ b/tests/border.test @@ -10,8 +10,8 @@ namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands -test border-1.1 {Tk_AllocBorderFromObj - converting internal reps} -constraints { - testborder +test border-1.1 {Tk_AllocBorderFromObj - converting internal reps} -constraints { + testborder } -body { set x orange lindex $x 0 @@ -21,8 +21,8 @@ test border-1.1 {Tk_AllocBorderFromObj - converting internal reps} -constraints } -cleanup { destroy .b1 } -result {{1 0}} -test border-1.2 {Tk_AllocBorderFromObj - discard stale border} -constraints { - testborder +test border-1.2 {Tk_AllocBorderFromObj - discard stale border} -constraints { + testborder } -setup { set result {} } -body { @@ -35,8 +35,8 @@ test border-1.2 {Tk_AllocBorderFromObj - discard stale border} -constraints { } -cleanup { destroy .b1 .b2 } -result {{} {{1 1}}} -test border-1.3 {Tk_AllocBorderFromObj - reuse existing border} -constraints { - testborder +test border-1.3 {Tk_AllocBorderFromObj - reuse existing border} -constraints { + testborder } -setup { set result {} } -body { @@ -49,7 +49,7 @@ test border-1.3 {Tk_AllocBorderFromObj - reuse existing border} -constraints { } -cleanup { destroy .b1 .b2 } -result {{{1 1}} {{2 1}}} -test border-1.4 {Tk_AllocBorderFromObj - try other borders in list} -constraints { +test border-1.4 {Tk_AllocBorderFromObj - try other borders in list} -constraints { testborder pseudocolor8 } -setup { toplevel .t -visual {pseudocolor 8} -colormap new @@ -70,7 +70,7 @@ test border-1.4 {Tk_AllocBorderFromObj - try other borders in list} -constraints destroy .b1 .b2 .t } -result {{{1 1}} {{1 1} {1 0}} {{1 0} {2 1}}} -test border-2.1 {Tk_Free3DBorder - reference counts} -constraints { +test border-2.1 {Tk_Free3DBorder - reference counts} -constraints { testborder pseudocolor8 } -setup { toplevel .t -visual {pseudocolor 8} -colormap new @@ -94,7 +94,7 @@ test border-2.1 {Tk_Free3DBorder - reference counts} -constraints { } -cleanup { destroy .b1 .b2 .t } -result {{{1 0} {2 1}} {{1 0} {1 1}} {{1 0}} {}} -test border-2.2 {Tk_Free3DBorder - unlinking from list} -constraints { +test border-2.2 {Tk_Free3DBorder - unlinking from list} -constraints { testborder pseudocolor8 } -setup { toplevel .t -visual {pseudocolor 8} -colormap new @@ -127,8 +127,8 @@ test border-2.2 {Tk_Free3DBorder - unlinking from list} -constraints { destroy .b .t2 .t3 .t } -result {{{4 1} {3 0} {2 0} {1 0}} {{4 1} {2 0} {1 0}} {{4 1} {2 0}} {{2 0}} {}} -test border-3.1 {FreeBorderObjProc} -constraints { - testborder +test border-3.1 {FreeBorderObjProc} -constraints { + testborder } -setup { set result {} proc copy {s} {return [string index $s 0][string range $s 1 end]} diff --git a/tests/clipboard.test b/tests/clipboard.test index 9689942..81534d5 100644 --- a/tests/clipboard.test +++ b/tests/clipboard.test @@ -180,7 +180,7 @@ test clipboard-4.4 {ClipboardLostSel procedure} -setup { clipboard get } -cleanup { clipboard clear -} -returnCodes error -result {CLIPBOARD selection doesn't exist or form "STRING" not defined} +} -returnCodes error -result {CLIPBOARD selection doesn't exist or form "STRING" not defined} test clipboard-4.5 {ClipboardLostSel procedure} -setup { clipboard clear } -body { diff --git a/tests/cmds.test b/tests/cmds.test index fa7e788..caf5afe 100644 --- a/tests/cmds.test +++ b/tests/cmds.test @@ -39,7 +39,7 @@ test cmds-1.5 {tkwait visibility, window gets deleted} -setup { } -body { after 100 {set x deleted; destroy .f} tkwait visibility .f.b -} -returnCodes {error} -result {window ".f.b" was deleted before its visibility changed} +} -returnCodes {error} -result {window ".f.b" was deleted before its visibility changed} test cmds-1.6 {tkwait visibility, window gets deleted} -setup { frame .f button .f.b -text "Test" diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index 140d7fa..a890fd7 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -813,7 +813,7 @@ test imgPhoto-4.75 { read command: filename starting with '-'} -constrain file delete ./-teapotPhotoFile } -result {} test imgPhoto-4.76 {ImgPhotoCmd procedure: copy to same image} -constraints { - hasTeapotPhoto + hasTeapotPhoto } -setup { imageCleanup image create photo photo1 -file $teapotPhotoFile diff --git a/tests/main.test b/tests/main.test index 7ab624f..deb0783 100644 --- a/tests/main.test +++ b/tests/main.test @@ -55,7 +55,7 @@ test main-2.2 {Tk_MainEx: -encoding option} -constraints stdio -setup { removeFile script } -result "script {} 0\n0\n" - # Procedure to simulate interactive typing of commands, line by line, + # Procedure to simulate interactive typing of commands, line by line, # for test 2.3 proc type {chan script} { foreach line [split $script \n] { diff --git a/tests/menu.test b/tests/menu.test index 6a3c6fe..7589aea 100644 --- a/tests/menu.test +++ b/tests/menu.test @@ -276,7 +276,7 @@ destroy .m1 # We need to test all of the options with all of the different types of # menu entries. The following code sets up .m1 with 6 items. It then # runs through the 2.31 - 2.228 tests below -# index 0 is tearoff, 1 command, 2 cascade, 3 separator, 4 checkbutton, +# index 0 is tearoff, 1 command, 2 cascade, 3 separator, 4 checkbutton, # 5 radiobutton deleteWindows menu .m1 -tearoff 1 @@ -771,34 +771,34 @@ test menu-2.132 {entry configuration options 5 -image bogus radiobutton} -body { } -returnCodes error -result {image "bogus" doesn't exist} test menu-2.133 {entry configuration options 0 -image {} tearoff} -body { - .m1 entryconfigure 0 -image + .m1 entryconfigure 0 -image } -returnCodes error -result {unknown option "-image"} test menu-2.134 {entry configuration options 1 -image {} command} -setup { .m1 entryconfigure 1 -image {} } -body { - .m1 entryconfigure 1 -image + .m1 entryconfigure 1 -image lindex [.m1 entryconfigure 1 -image] 4 } -result {} test menu-2.135 {entry configuration options 2 -image {} cascade} -setup { .m1 entryconfigure 2 -image {} } -body { - .m1 entryconfigure 2 -image + .m1 entryconfigure 2 -image lindex [.m1 entryconfigure 2 -image] 4 } -result {} test menu-2.136 {entry configuration options 3 -image {} separator} -body { - .m1 entryconfigure 3 -image + .m1 entryconfigure 3 -image } -returnCodes error -result {unknown option "-image"} test menu-2.137 {entry configuration options 4 -image {} checkbutton} -body { - .m1 entryconfigure 4 -image + .m1 entryconfigure 4 -image lindex [.m1 entryconfigure 4 -image] 4 } -result {} test menu-2.138 {entry configuration options 5 -image {} radiobutton} -body { - .m1 entryconfigure 5 -image + .m1 entryconfigure 5 -image lindex [.m1 entryconfigure 5 -image] 4 } -result {} @@ -1052,28 +1052,28 @@ test menu-2.192 {entry configuration options 5 -selectimage bogus radiobutton} - } -returnCodes error -result {image "bogus" doesn't exist} test menu-2.193 {entry configuration options 0 -selectimage {} tearoff} -body { - .m1 entryconfigure 0 -selectimage + .m1 entryconfigure 0 -selectimage } -returnCodes error -result {unknown option "-selectimage"} test menu-2.194 {entry configuration options 1 -selectimage {} command} -body { - .m1 entryconfigure 1 -selectimage + .m1 entryconfigure 1 -selectimage } -returnCodes error -result {unknown option "-selectimage"} test menu-2.195 {entry configuration options 2 -selectimage {} cascade} -body { - .m1 entryconfigure 2 -selectimage + .m1 entryconfigure 2 -selectimage } -returnCodes error -result {unknown option "-selectimage"} test menu-2.196 {entry configuration options 3 -selectimage {} separator} -body { - .m1 entryconfigure 3 -selectimage + .m1 entryconfigure 3 -selectimage } -returnCodes error -result {unknown option "-selectimage"} test menu-2.197 {entry configuration options 4 -selectimage {} checkbutton} -body { - .m1 entryconfigure 4 -selectimage + .m1 entryconfigure 4 -selectimage lindex [.m1 entryconfigure 4 -selectimage] 4 } -result {} test menu-2.198 {entry configuration options 5 -selectimage {} radiobutton} -body { - .m1 entryconfigure 5 -selectimage + .m1 entryconfigure 5 -selectimage lindex [.m1 entryconfigure 5 -selectimage] 4 } -result {} @@ -1225,7 +1225,7 @@ test menu-3.1 {MenuWidgetCmd procedure} -setup { destroy .m1 } -returnCodes error -result {wrong # args: should be ".m1 option ?arg ...?"} test menu-3.2 {MenuWidgetCmd, Tcl_Preserve and Tcl_Release} -constraints { - nonUnixUserInteraction + nonUnixUserInteraction } -setup { destroy .m1 } -body { @@ -1237,7 +1237,7 @@ test menu-3.2 {MenuWidgetCmd, Tcl_Preserve and Tcl_Release} -constraints { } -returnCodes ok -result {} test menu-3.3 {MenuWidgetCmd procedure, "activate" option} -setup { destroy .m1 -} -body { +} -body { menu .m1 .m1 add command -label "test" .m1 activate @@ -1414,7 +1414,7 @@ test menu-3.26 {MenuWidgetCmd procedure, "delete" option} -setup { } -body { menu .m1 .m1 add command -label "foo" - .m1 delete 1 0 + .m1 delete 1 0 } -cleanup { destroy .m1 } -result {} @@ -1627,7 +1627,7 @@ test menu-3.50 {MenuWidgetCmd procedure, "post" option} -constraints { nonUnixUserInteraction } -setup { destroy .m1 -} -body { +} -body { menu .m1 .m1 add command -label "menu-3.53: hit Escape" -command "puts hello" .m1 post 40 40 @@ -1654,7 +1654,7 @@ test menu-3.53 {MenuWidgetCmd procedure, "postcascade" option} -constraints { nonUnixUserInteraction } -setup { destroy .m1 .m2 -} -body { +} -body { menu .m1 .m1 add command -label "menu-3.56 - hit Escape" menu .m2 @@ -1756,10 +1756,10 @@ test menu-3.64 {MenuWidgetCmd procedure, "unpost" option} -constraints { nonUnixUserInteraction } -setup { destroy .m1 -} -body { +} -body { menu .m1 .m1 add command -label "menu-3.68 - hit Escape" - .m1 post 40 40 + .m1 post 40 40 .m1 unpost } -cleanup { destroy .m1 @@ -1898,7 +1898,7 @@ test menu-4.5 {TkInvokeMenu: checkbutton array element} -setup { } -body { catch {unset foo} menu .m1 - .m1 add checkbutton -label "test" -variable foo(1) -onvalue on + .m1 add checkbutton -label "test" -variable foo(1) -onvalue on list [catch {.m1 invoke 1} msg] $msg [catch {set foo(1)} msg2] $msg2 [catch {unset foo} msg3] $msg3 } -cleanup { destroy .m1 @@ -1966,7 +1966,7 @@ test menu-4.11 {TkInvokeMenu} -setup { } -body { menu .m1 .m1 add cascade -label "test" -menu .m1.m2 - list [catch {.m1 invoke 1} msg] $msg + list [catch {.m1 invoke 1} msg] $msg } -cleanup { destroy .m1 } -result {0 {}} @@ -2123,7 +2123,7 @@ test menu-6.4 {TkDestroyMenu - reentrancy - clones} -setup { destroy .m1 } -cleanup { deleteWindows -} -returnCodes ok +} -returnCodes ok test menu-6.5 {TkDestroyMenu} -setup { destroy .m1 .m2 } -body { @@ -2350,7 +2350,7 @@ test menu-8.4 {DestroyMenuEntry} -setup { menu .m1 .m1 add checkbutton -variable foo list [.m1 delete 1] [destroy .m1] -} -result {{} {}} +} -result {{} {}} test menu-8.5 {DestroyMenuEntry} -setup { destroy .m1 } -body { @@ -2382,7 +2382,7 @@ test menu-9.1 {ConfigureMenu} -setup { destroy .m1 } -body { menu .m1 - list [.m1 configure -postcommand "beep"] [.m1 cget -postcommand] + list [.m1 configure -postcommand "beep"] [.m1 cget -postcommand] } -cleanup { deleteWindows } -result {{} beep} @@ -2515,7 +2515,7 @@ test menu-11.3 {ConfigureMenuEntry} -setup { test menu-11.4 {ConfigureMenuEntry} -setup { deleteWindows } -body { - menu .m1 + menu .m1 .m1 add command list [.m1 entryconfigure 1 -accel "S"] [.m1 entrycget 1 -accel] } -cleanup { @@ -2589,13 +2589,13 @@ test menu-11.12 {ConfigureMenuEntry} -setup { deleteWindows } -body { menu .m1 - menu .m2 + menu .m2 .m2 add cascade -menu .m1 - menu .m3 + menu .m3 .m3 add cascade -menu .m1 - menu .m4 + menu .m4 .m4 add cascade -menu .m1 - menu .m5 + menu .m5 .m5 add cascade .m5 entryconfigure 1 -label "test" -menu .m1 } -cleanup { @@ -2605,11 +2605,11 @@ test menu-11.13 {ConfigureMenuEntry} -setup { deleteWindows } -body { menu .m1 - menu .m2 + menu .m2 .m2 add cascade -menu .m1 - menu .m3 + menu .m3 .m3 add cascade -menu .m1 - menu .m4 + menu .m4 .m4 add cascade -menu .m1 .m3 entryconfigure 1 -label "test" -menu .m1 } -cleanup { @@ -3236,7 +3236,7 @@ test menu-18.4 {TkActivateMenuEntry} -setup { test menu-19.1 {TkPostCommand} -constraints nonUnixUserInteraction -setup { deleteWindows -} -body { +} -body { menu .m1 -postcommand "set menu_test menu-19.1" .m1 add command -label "menu-19.1 - hit Escape" list [.m1 post 40 40] [.m1 unpost] [set menu_test] @@ -3245,7 +3245,7 @@ test menu-19.1 {TkPostCommand} -constraints nonUnixUserInteraction -setup { } -result {menu-19.1 {} menu-19.1} test menu-19.2 {TkPostCommand} -constraints nonUnixUserInteraction -setup { deleteWindows -} -body { +} -body { menu .m1 .m1 add command -label "menu-19.2 - hit Escape" list [.m1 post 40 40] [.m1 unpost] @@ -3766,7 +3766,7 @@ test menu-32.1 {DeleteMenuCloneEntries} -setup { test menu-32.2 {DeleteMenuCloneEntries} -setup { deleteWindows } -body { - + menu .m1 .m1 add command -label one .m1 add command -label two diff --git a/tests/menuDraw.test b/tests/menuDraw.test index 0d7a049..9382974 100644 --- a/tests/menuDraw.test +++ b/tests/menuDraw.test @@ -76,7 +76,7 @@ test menuDraw-5.3 {TkMenuConfigureDrawOptions - no disabledFg} -setup { menu .m1 -disabledforeground "" } -cleanup { deleteWindows -} -result {.m1} +} -result {.m1} test menuDraw-6.1 {TkMenuConfigureEntryDrawOptions - no tkfont specified} -setup { @@ -321,7 +321,7 @@ test menuDraw-10.4 {ComputeMenuGeometry - resize not necessary} -setup { test menuDraw-11.1 {TkMenuSelectImageProc - entry selected; redraw not pending} -constraints { - testImageType + testImageType } -setup { deleteWindows imageCleanup @@ -338,7 +338,7 @@ test menuDraw-11.1 {TkMenuSelectImageProc - entry selected; redraw not pending} imageCleanup } -result {{} {}} test menuDraw-11.2 {TkMenuSelectImageProc - entry selected; redraw pending} -constraints { - testImageType + testImageType } -setup { deleteWindows imageCleanup @@ -354,7 +354,7 @@ test menuDraw-11.2 {TkMenuSelectImageProc - entry selected; redraw pending} -con imageCleanup } -result {{} {}} test menuDraw-11.3 {TkMenuSelectImageProc - entry not selected} -constraints { - testImageType + testImageType } -setup { deleteWindows imageCleanup @@ -451,7 +451,7 @@ test menuDraw.12.7 {DisplayMenu - three columns} -setup { deleteWindows } -result {} test menuDraw-12.6 {Display menu - testing for extra space and menubars} -constraints { - unix + unix } -setup { deleteWindows } -body { @@ -668,7 +668,7 @@ test menuDraw-16.6 {TkPostSubMenu} -constraints { menu .m2 .m2 add command -label "Hit ESCAPE to get rid of this menu" set tearoff [tk::TearOffMenu .m1 40 40] - $tearoff postcascade 0 + $tearoff postcascade 0 } -cleanup { deleteWindows } -result {} diff --git a/tests/menubut.test b/tests/menubut.test index 4ac5d92..d245fd0 100644 --- a/tests/menubut.test +++ b/tests/menubut.test @@ -394,7 +394,7 @@ test menubutton-4.1 {ConfigureMenuButton procedure} -setup { .mb1 configure -width 1i } -cleanup { deleteWindows -} -returnCodes error -result {expected integer but got "1i"} +} -returnCodes error -result {expected integer but got "1i"} test menubutton-4.2 {ConfigureMenuButton procedure} -setup { deleteWindows } -body { @@ -451,7 +451,7 @@ test menubutton-4.6 {ConfigureMenuButton procedure} -setup { ".mb1 configure -width abc"} test menubutton-4.7 {ConfigureMenuButton procedure} -constraints { - testImageType + testImageType } -setup { deleteWindows imageCleanup @@ -464,7 +464,7 @@ test menubutton-4.7 {ConfigureMenuButton procedure} -constraints { imageCleanup } -returnCodes error -result {bad screen distance "0.5x"} test menubutton-4.8 {ConfigureMenuButton procedure} -constraints { - testImageType + testImageType } -setup { deleteWindows imageCleanup @@ -499,7 +499,7 @@ test menubutton-4.10 {ConfigureMenuButton procedure - bad direction} -setup { deleteWindows } -body { menubutton .mb -text "Test" - .mb configure -direction badValue + .mb configure -direction badValue } -cleanup { deleteWindows } -returnCodes error -result {bad direction "badValue": must be above, below, flush, left, or right} @@ -548,7 +548,7 @@ if {[tk windowingsystem] == "aqua"} { set extraWidth 0 } test menubutton-7.1 {ComputeMenuButtonGeometry procedure} -constraints { - testImageType + testImageType } -setup { deleteWindows image create test image1 @@ -561,7 +561,7 @@ test menubutton-7.1 {ComputeMenuButtonGeometry procedure} -constraints { imageCleanup } -result [list [expr {38 + $extraWidth}] 23] test menubutton-7.2 {ComputeMenuButtonGeometry procedure} -constraints { - testImageType + testImageType } -setup { deleteWindows image create test image1 @@ -574,7 +574,7 @@ test menubutton-7.2 {ComputeMenuButtonGeometry procedure} -constraints { imageCleanup } -result [list [expr {38 + $extraWidth}] 23] test menubutton-7.3 {ComputeMenuButtonGeometry procedure} -constraints { - testImageType + testImageType } -setup { deleteWindows image create test image1 @@ -587,7 +587,7 @@ test menubutton-7.3 {ComputeMenuButtonGeometry procedure} -constraints { imageCleanup } -result [list [expr {38 + $extraWidth}] 23] test menubutton-7.4 {ComputeMenuButtonGeometry procedure} -constraints { - testImageType + testImageType } -setup { deleteWindows image create test image1 @@ -601,7 +601,7 @@ test menubutton-7.4 {ComputeMenuButtonGeometry procedure} -constraints { imageCleanup } -result [list [expr {48 + $extraWidth}] 23] test menubutton-7.5 {ComputeMenuButtonGeometry procedure} -constraints { - testImageType + testImageType } -setup { deleteWindows image create test image1 diff --git a/tests/scale.test b/tests/scale.test index 38c3e9a..34f2cd9 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -324,7 +324,7 @@ test scale-2.1 {Tk_ScaleCmd procedure} -body { scale } -returnCodes error -result {wrong # args: should be "scale pathName ?-option value ...?"} test scale-2.2 {Tk_ScaleCmd procedure} -body { - scale foo + scale foo } -returnCodes error -result {bad window path name "foo"} test scale-2.3 {Tk_ScaleCmd procedure} -body { catch {scale foo} diff --git a/tests/scrollbar.test b/tests/scrollbar.test index 097ab79..4963cf8 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 failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] + proc scroll args { global scrollInfo set scrollInfo $args @@ -270,13 +272,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 { +test scrollbar-3.36 {ScrollbarWidgetCmd procedure, "fraction" option} {x11 failsOnUbuntu} { 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 { +test scrollbar-3.38 {ScrollbarWidgetCmd procedure, "fraction" option} {x11 failsOnUbuntu} { format {%.6g} [.s fraction 4 178] } {0.993711} test scrollbar-3.39 {ScrollbarWidgetCmd procedure, "fraction" option} {testmetrics win} { @@ -491,7 +493,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 { +test scrollbar-6.12.1 {ScrollbarPosition procedure} {x11 failsOnUbuntu} { .s identify 8 19 } {arrow1} test scrollbar-6.12.2 {ScrollbarPosition procedure} aqua { @@ -549,7 +551,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 { +test scrollbar-6.29.1 {ScrollbarPosition procedure} {x11 failsOnUbuntu} { .s identify 8 180 } {arrow2} test scrollbar-6.29.2 {ScrollbarPosition procedure} aqua { @@ -573,7 +575,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 { +test scrollbar-6.35 {ScrollbarPosition procedure} {unix failsOnUbuntu} { .s identify 18 100 } {trough2} test scrollbar-6.37 {ScrollbarPosition procedure} win { @@ -612,7 +614,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 { +test scrollbar-6.44 {ScrollbarPosition procedure} {unix failsOnUbuntu} { .t.s identify 100 18 } {trough2} test scrollbar-6.46 {ScrollbarPosition procedure} win { diff --git a/tests/select.test b/tests/select.test index f89a736..9146397 100644 --- a/tests/select.test +++ b/tests/select.test @@ -952,7 +952,7 @@ test select-9.5 {SelCvtToX and SelCvtFromX procedures} -setup { # most control paths have been exercised above test select-10.1 {ConvertSelection procedure, race with selection clear} -constraints { - x11 + x11 } -setup { setup } -body { @@ -1021,7 +1021,7 @@ test select-10.4 {ConvertSelection procedure} -constraints { lappend result $selInfo } -result {{selection owner didn't respond} {STRING 0 4000 STRING 4000 4000 STRING 8000 4000 STRING 12000 4000 STRING 16000 4000 STRING 0 4000 STRING 4000 4000}} test select-10.5 {ConvertSelection procedure, reentrancy issues} -constraints { - x11 + x11 } -setup { setup setupbg @@ -1036,7 +1036,7 @@ test select-10.5 {ConvertSelection procedure, reentrancy issues} -constraints { lappend result $selInfo } -result {{PRIMARY selection doesn't exist or form "STRING" not defined} {.f1 STRING 0 4000}} test select-10.6 {ConvertSelection procedure, reentrancy issues} -constraints { - x11 + x11 } -setup { setup setupbg @@ -1131,7 +1131,7 @@ test select-12.6 {DefaultSelection procedure} -body { } -result {{Targets value} {TARGETS.f1 0 4000} {MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW}} test select-13.1 {SelectionSize procedure, handler deleted} -constraints { - x11 + x11 } -setup { setup setupbg diff --git a/tests/textDisp.test b/tests/textDisp.test index 94032fe..d54eb62 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 failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] + # Platform specific procedure for updating the text widget. if {[tk windowingsystem] == "aqua"} { @@ -2928,28 +2930,28 @@ for {set i 2} {$i <= 200} {incr i} { .t configure -wrap word .t delete 50.0 51.0 .t insert 50.0 "This is a long line, one that will wrap around twice.\n" -test textDisp-20.1 {FindDLine} { +test textDisp-20.1 {FindDLine} failsOnUbuntu { .t yview 48.0 list [.t dlineinfo 46.0] [.t dlineinfo 47.0] [.t dlineinfo 49.0] \ [.t dlineinfo 58.0] } [list {} {} [list 3 [expr {$fixedDiff + 16}] 49 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] {}] -test textDisp-20.2 {FindDLine} { +test textDisp-20.2 {FindDLine} failsOnUbuntu { .t yview 100.0 .t yview -pickplace 53.0 list [.t dlineinfo 50.0] [.t dlineinfo 50.14] [.t dlineinfo 50.21] } [list [list 3 [expr {-1 - $fixedDiff/2}] 140 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] [list 3 [expr {-1 - $fixedDiff/2}] 140 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] [list 3 [expr {12 + $fixedDiff/2}] 133 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]]] -test textDisp-20.3 {FindDLine} { +test textDisp-20.3 {FindDLine} failsOnUbuntu { .t yview 100.0 .t yview 49.0 list [.t dlineinfo 50.0] [.t dlineinfo 50.24] [.t dlineinfo 57.0] } [list [list 3 [expr {$fixedDiff + 16}] 140 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] [list 3 [expr {2*$fixedDiff + 29}] 133 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] {}] -test textDisp-20.4 {FindDLine} { +test textDisp-20.4 {FindDLine} failsOnUbuntu { .t yview 100.0 .t yview 42.0 list [.t dlineinfo 50.0] [.t dlineinfo 50.24] [.t dlineinfo 50.40] } [list [list 3 [expr {8*$fixedDiff + 107}] 140 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] [list 3 [expr {9*$fixedDiff + 120}] 133 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] {}] .t config -wrap none -test textDisp-20.5 {FindDLine} { +test textDisp-20.5 {FindDLine} failsOnUbuntu { .t yview 100.0 .t yview 48.0 list [.t dlineinfo 50.0] [.t dlineinfo 50.20] [.t dlineinfo 50.40] diff --git a/tests/textWind.test b/tests/textWind.test index 41af5e9..40bc8dd 100644 --- a/tests/textWind.test +++ b/tests/textWind.test @@ -11,6 +11,8 @@ namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands +testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] + deleteWindows set fixedFont {"Courier" -12} @@ -792,7 +794,7 @@ test textWind-10.6 {EmbWinLayoutProc procedure, error in creating window} -setup {{can't embed .t relative to .t}} \ [list [expr {$padx+5*$fixedWidth}] [expr {$pady+($fixedHeight/2)}] 0 0]] -test textWind-10.7 {EmbWinLayoutProc procedure, error in creating window} -setup { +test textWind-10.7 {EmbWinLayoutProc procedure, error in creating window} -constraints failsOnUbuntu -setup { .t delete 1.0 end destroy .t2 proc bgerror args { diff --git a/tests/unixButton.test b/tests/unixButton.test index 325f497..f0dcde5 100644 --- a/tests/unixButton.test +++ b/tests/unixButton.test @@ -16,7 +16,7 @@ imageInit # Create entries in the option database to be sure that geometry options # like border width have predictable values. - + option add *Label.borderWidth 2 option add *Label.highlightThickness 0 option add *Label.font {Helvetica -12 bold} @@ -70,7 +70,7 @@ test unixbutton-1.1 {TkpComputeButtonGeometry procedure} -constraints { [expr {72 + $bigIndicator}] 52 \ [expr {72 + $bigIndicator}] 52] test unixbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints { - unix + unix } -setup { deleteWindows } -body { @@ -91,7 +91,7 @@ test unixbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints { [expr {27 + $smallIndicator}] 37 \ [expr {27 + $smallIndicator}] 37] test unixbutton-1.3 {TkpComputeButtonGeometry procedure} -constraints { - unix + unix } -setup { deleteWindows } -body { @@ -192,7 +192,7 @@ test unixbutton-1.8 {TkpComputeButtonGeometry procedure} -constraints { deleteWindows } -result {62 30 56 24 58 22 62 22} test unixbutton-1.9 {TkpComputeButtonGeometry procedure} -constraints { - unix + unix } -setup { deleteWindows } -body { @@ -200,9 +200,9 @@ test unixbutton-1.9 {TkpComputeButtonGeometry procedure} -constraints { list [winfo reqwidth .b2] [winfo reqheight .b2] } -cleanup { deleteWindows -} -result [list [expr {17 + $defaultBorder}] [expr {27 + $defaultBorder}]] +} -result [list [expr {17 + $defaultBorder}] [expr {27 + $defaultBorder}]] test unixbutton-1.10 {TkpComputeButtonGeometry procedure} -constraints { - unix + unix } -setup { deleteWindows } -body { @@ -212,7 +212,7 @@ test unixbutton-1.10 {TkpComputeButtonGeometry procedure} -constraints { deleteWindows } -result [list [expr {17 + $defaultBorder}] [expr {27 + $defaultBorder}]] test unixbutton-1.11 {TkpComputeButtonGeometry procedure} -constraints { - unix + unix } -setup { deleteWindows } -body { @@ -224,7 +224,7 @@ test unixbutton-1.11 {TkpComputeButtonGeometry procedure} -constraints { test unixbutton-2.1 {disabled coloring check, bug 669595} -constraints { - unix + unix } -setup { deleteWindows catch {unset value} diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test index cd7f15f..578075e 100644 --- a/tests/unixEmbed.test +++ b/tests/unixEmbed.test @@ -11,6 +11,8 @@ eval tcltest::configure $argv tcltest::loadTestedCommands namespace import -force tcltest::test +testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] + namespace eval ::_test_tmp {} # ------------------------------------------------------------------------------ @@ -1086,7 +1088,7 @@ test unixEmbed-7.2a {TkpRedirectKeyEvent procedure, don't forward keystroke widt } -result {{} {{key b}}} test unixEmbed-8.1 {TkpClaimFocus procedure} -constraints { - unix notAqua + unix notAqua failsOnUbuntu } -setup { deleteWindows } -body { @@ -1188,9 +1190,9 @@ test unixEmbed-9.1 {EmbedWindowDeleted procedure, check parentPtr} -constraints deleteWindows } -result {{{XXX .f4 {} {}} {XXX .f3 {} {}} {XXX .f2 {} {}} {XXX .f1 {} {}}} {{XXX .f4 {} {}} {XXX .f2 {} {}} {XXX .f1 {} {}}} {{XXX .f2 {} {}} {XXX .f1 {} {}}} {{XXX .f2 {} {}}} {}} test unixEmbed-9.2 {EmbedWindowDeleted procedure, check embeddedPtr} -constraints { - unix testembed notAqua + unix testembed notAqua } -setup { - deleteWindows + deleteWindows } -body { frame .f1 -container 1 -width 200 -height 50 pack .f1 @@ -1233,9 +1235,9 @@ test unixEmbed-9.2a {EmbedWindowDeleted procedure, check embeddedPtr} -constrain test unixEmbed-10.1 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -constraints { - unix + unix failsOnUbuntu } -setup { - deleteWindows + deleteWindows } -body { frame .f1 -container 1 -width 200 -height 50 pack .f1 @@ -1249,9 +1251,9 @@ 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 + unix failsOnUbuntu } -setup { - deleteWindows + deleteWindows } -body { frame .f1 -container 1 -width 200 -height 50 pack .f1 @@ -1266,9 +1268,9 @@ test unixEmbed-10.2 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -con } -result {70x300+0+0} test unixEmbed-11.1 {focus -force works for embedded toplevels} -constraints { - unix + unix } -setup { - deleteWindows + deleteWindows } -body { toplevel .t pack [frame .t.f -container 1 -width 200 -height 200] -fill both @@ -1282,9 +1284,9 @@ test unixEmbed-11.1 {focus -force works for embedded toplevels} -constraints { deleteWindows } -result .embed test unixEmbed-11.2 {mouse coordinates in embedded toplevels} -constraints { - unix pressbutton + unix pressbutton } -setup { - deleteWindows + deleteWindows } -body { toplevel .main set result {} diff --git a/tests/unixFont.test b/tests/unixFont.test index eb2a23b..9a8f864 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 failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] + if {[tk windowingsystem] eq "x11"} { set xlsf [auto_execok xlsfonts] } @@ -69,7 +71,7 @@ proc getsize {} { test unixfont-1.1 {TkpGetNativeFont procedure: not native} {x11 noExceed} { list [catch {font measure {} xyz} msg] $msg } {1 {font "" doesn't exist}} -test unixfont-1.2 {TkpGetNativeFont procedure: native} x11 { +test unixfont-1.2 {TkpGetNativeFont procedure: native} {x11 failsOnUbuntu} { font measure fixed 0 } {6} @@ -78,21 +80,21 @@ test unixfont-2.1 {TkpGetFontFromAttributes procedure: no family} x11 { set x {} } {} test unixfont-2.2 {TkpGetFontFromAttributes procedure: Times relatives} \ - {x11 noExceed hasTimesNew} { + {x11 noExceed hasTimesNew failsOnUbuntu} { set x {} lappend x [lindex [font actual {-family "Times New Roman"}] 1] lappend x [lindex [font actual {-family "New York"}] 1] lappend x [lindex [font actual {-family "Times"}] 1] } {times times times} test unixfont-2.3 {TkpGetFontFromAttributes procedure: Courier relatives} \ - {x11 noExceed hasCourierNew} { + {x11 noExceed hasCourierNew failsOnUbuntu} { set x {} lappend x [lindex [font actual {-family "Courier New"}] 1] lappend x [lindex [font actual {-family "Monaco"}] 1] lappend x [lindex [font actual {-family "Courier"}] 1] } {courier courier courier} test unixfont-2.4 {TkpGetFontFromAttributes procedure: Helvetica relatives} \ - {x11 noExceed hasArial} { + {x11 noExceed hasArial failsOnUbuntu} { set x {} lappend x [lindex [font actual {-family "Arial"}] 1] lappend x [lindex [font actual {-family "Geneva"}] 1] @@ -102,16 +104,16 @@ test unixfont-2.5 {TkpGetFontFromAttributes procedure: fallback} x11 { font actual {-xyz-xyz-*-*-*-*-*-*-*-*-*-*-*-*} set x {} } {} -test unixfont-2.6 {TkpGetFontFromAttributes: fallback to fixed family} x11 { +test unixfont-2.6 {TkpGetFontFromAttributes: fallback to fixed family} {x11 failsOnUbuntu} { lindex [font actual {-family fixed -size 10}] 1 } {fixed} test unixfont-2.7 {TkpGetFontFromAttributes: fixed family not available!} x11 { # no test available } {} -test unixfont-2.8 {TkpGetFontFromAttributes: loop over returned font names} x11 { +test unixfont-2.8 {TkpGetFontFromAttributes: loop over returned font names} {x11 failsOnUbuntu} { lindex [font actual {-family fixed -size 31}] 1 } {fixed} -test unixfont-2.9 {TkpGetFontFromAttributes: reject adobe courier if possible} {x11 noExceed} { +test unixfont-2.9 {TkpGetFontFromAttributes: reject adobe courier if possible} {x11 noExceed failsOnUbuntu} { lindex [font actual {-family courier}] 1 } {courier} test unixfont-2.10 {TkpGetFontFromAttributes: scalable font found} x11 { @@ -166,11 +168,11 @@ test unixfont-5.7 {Tk_MeasureChars procedure: already saw space in line} x11 { .b.l config -text "000000 00000" getsize } "[expr $ax*6] [expr $ay*2]" -test unixfont-5.8 {Tk_MeasureChars procedure: internal spaces significant} x11 { +test unixfont-5.8 {Tk_MeasureChars procedure: internal spaces significant} {x11 failsOnUbuntu} { .b.l config -text "00 000 00000" getsize } "[expr $ax*7] [expr $ay*2]" -test unixfont-5.9 {Tk_MeasureChars procedure: TK_PARTIAL_OK} x11 { +test unixfont-5.9 {Tk_MeasureChars procedure: TK_PARTIAL_OK} {x11 failsOnUbuntu} { .b.c dchars $t 0 end .b.c insert $t 0 "0000" .b.c index $t @[expr int($ax*2.5)],1 @@ -186,7 +188,7 @@ test unixfont-5.11 {Tk_MeasureChars: TK_AT_LEAST_ONE + not even one char fit!} x .b.l config -wrap $a set x } "$ax [expr $ay*6]" -test unixfont-5.12 {Tk_MeasureChars procedure: include eol spaces} x11 { +test unixfont-5.12 {Tk_MeasureChars procedure: include eol spaces} {x11 failsOnUbuntu} { .b.l config -text "000 \n000" getsize } "[expr $ax*6] [expr $ay*2]" @@ -253,7 +255,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 { +test unixfont-8.4 {AllocFont procedure: classify characters} {x11 failsOnUbuntu} { set x 0 incr x [font measure $courier "\u4000"] ;# 6 incr x [font measure $courier "\002"] ;# 4 @@ -264,7 +266,7 @@ test unixfont-8.4 {AllocFont procedure: classify characters} x11 { 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 { +test unixfont-8.6 {AllocFont procedure: setup widths of special chars} {x11 failsOnUbuntu} { set x 0 incr x [font measure $courier "\001"] ;# 4 incr x [font measure $courier "\002"] ;# 4 @@ -292,7 +294,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 { +test unixfont-9.1 {GetControlCharSubst procedure: 2 chars subst} {x11 failsOnUbuntu} { .b.c dchars $t 0 end .b.c insert $t 0 "0\a0" set x {} @@ -301,7 +303,7 @@ test unixfont-9.1 {GetControlCharSubst procedure: 2 chars subst} x11 { 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 { +test unixfont-9.2 {GetControlCharSubst procedure: 4 chars subst} {x11 failsOnUbuntu} { .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 10050de..bdca89b 100644 --- a/tests/unixWm.test +++ b/tests/unixWm.test @@ -13,6 +13,8 @@ tcltest::loadTestedCommands namespace import -force ::tk::test:loadTkCommand +testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] + proc sleep ms { global x after $ms {set x 1} @@ -287,7 +289,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 { +test unixWm-8.4 {icon windows} {unix failsOnUbuntu} { destroy .t destroy .icon toplevel .t -width 100 -height 30 @@ -632,7 +634,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 { +test unixWm-16.3 {Tk_WmCmd procedure, "deiconify" option} {unix failsOnUbuntu} { wm iconify .t set result {} lappend result [winfo ismapped .t] [wm state .t] @@ -851,7 +853,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 { +test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} {unix failsOnUbuntu} { destroy .t2 toplevel .t2 wm geom .t2 +0+0 @@ -862,7 +864,7 @@ test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} unix { destroy .t2 set result } {0} -test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} unix { +test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} {unix failsOnUbuntu} { destroy .t2 toplevel .t2 wm geom .t2 -0+0 @@ -1433,7 +1435,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 { +test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} {unix failsOnUbuntu} { destroy .t toplevel .t -width 400 -height 150 wm geometry .t +0+0 @@ -1610,7 +1612,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} { +test unixWm-45.2 {UpdateSizeHints procedure} {unix testwrapper failsOnUbuntu} { destroy .t toplevel .t -width 80 -height 60 wm minsize .t 30 40 @@ -1638,7 +1640,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} { +test unixWm-45.4 {UpdateSizeHints procedure, not resizable with menu} {testmenubar testwrapper failsOnUbuntu} { destroy .t toplevel .t -width 80 -height 60 frame .t.menu -height 23 -width 50 @@ -1792,7 +1794,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 { +test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords, title bar} {unix failsOnUbuntu} { update toplevel .t -width 300 -height 400 -bg green wm geom .t +100+100 @@ -1957,7 +1959,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 { +test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} {unix failsOnUbuntu} { destroy .t destroy .t2 toplevel .t -width 200 -height 200 -bg green diff --git a/tests/visual_bb.test b/tests/visual_bb.test index 2b06d05..030a369 100644 --- a/tests/visual_bb.test +++ b/tests/visual_bb.test @@ -52,7 +52,7 @@ test 1.1 {running visual tests} -constraints userInteraction -body { frame .menu -relief raised -borderwidth 1 message .msg -font {Times 18} -relief raised -width 4i \ -borderwidth 1 -text "This application provides a collection of visual tests for the Tk toolkit. Each menu entry invokes a test, which displays information on the screen. You can then verify visually that the information is being displayed in the correct way. The tests under the \"Postscript\" menu exercise the Postscript-generation capabilities of canvas widgets." - + pack .menu -side top -fill x pack .msg -side bottom -expand yes -fill both @@ -64,7 +64,7 @@ test 1.1 {running visual tests} -constraints userInteraction -body { menubutton .menu.file -text "File" -menu .menu.file.m menu .menu.file.m .menu.file.m add command -label "Quit" -command end - + menubutton .menu.group1 -text "Group 1" -menu .menu.group1.m menu .menu.group1.m .menu.group1.m add command -label "Canvas arcs" -command {runTest arc.tcl} @@ -76,7 +76,7 @@ test 1.1 {running visual tests} -constraints userInteraction -body { -command {runTest butGeom.tcl} .menu.group1.m add command -label "Label/button colors" \ -command {runTest butGeom2.tcl} - + menubutton .menu.ps -text "Canvas Postscript" -menu .menu.ps.m menu .menu.ps.m .menu.ps.m add command -label "Rectangles and other graphics" \ @@ -89,11 +89,11 @@ test 1.1 {running visual tests} -constraints userInteraction -body { -command {runTest canvPsImg.tcl} .menu.ps.m add command -label "Arcs" \ -command {runTest canvPsArc.tcl} - + pack .menu.file .menu.group1 .menu.ps -side left -padx 1m - + # Set up for keyboard-based menu traversal - + bind . { if {("%d" == "NotifyVirtual") && ("%m" == "NotifyNormal")} { focus .menu diff --git a/tests/winDialog.test b/tests/winDialog.test index 852a38a..e70ae3f 100755 --- a/tests/winDialog.test +++ b/tests/winDialog.test @@ -255,7 +255,7 @@ test winDialog-5.5 {GetFileName: Tcl_GetIndexFromObj() == TCL_OK} -constraints { set y [then { Click cancel }] - # Note this also tests fix for + # Note this also tests fix for # https://core.tcl-lang.org/tk/tktview/4a0451f5291b3c9168cc560747dae9264e1d2ef6 # $x is expected to be empty append x $y @@ -441,7 +441,7 @@ test winDialog-5.9 {GetFileName: file types} -constraints { nt testwinevent } -body { # case FILE_TYPES: - + start {tk_getSaveFile -filetypes {{"foo files" .foo FOOF}} -title Foo} # XXX - currently disabled for vista style dialogs because the file # types control has no control ID and we don't have a mechanism to @@ -504,7 +504,7 @@ test winDialog-5.12.1 {tk_getSaveFile: initial directory: ~} -constraints { test winDialog-5.12.2 {tk_getSaveFile: initial directory: ~user} -constraints { nt testwinevent } -body { - + # Note: this test will fail on Tcl versions 8.6.4 and earlier due # to a bug in file normalize for names of the form ~xxx that # returns the wrong dir on Windows. In particular (in Win8 at @@ -731,7 +731,7 @@ test winDialog-5.17 {GetFileName: title} -constraints { nt testwinevent } -body { # case FILE_TITLE: - + start {tk_getOpenFile -title Narf} then { Click cancel @@ -794,7 +794,7 @@ test winDialog-5.21 {GetFileName: call GetOpenFileName} -constraints { nt testwinevent english } -body { # winCode = GetOpenFileName(&ofn); - + start {tk_getOpenFile -title Open} then { set x [GetText ok] @@ -927,7 +927,7 @@ test winDialog-9.8 {Tk_ChooseDirectoryObjCmd: initial directory: Tcl_TranslateFi } -body { # if (Tcl_TranslateFileName(interp, string, # &utfDirString) == NULL) - + tk_chooseDirectory -initialdir ~12x/455 } -returnCodes error -result {user "12x" doesn't exist} diff --git a/tests/winFont.test b/tests/winFont.test index 377ef41..4a394cf 100644 --- a/tests/winFont.test +++ b/tests/winFont.test @@ -4,7 +4,7 @@ # Many of these tests are visually oriented and cannot be checked # programmatically (such as "does an underlined font appear to be # underlined?"); these tests attempt to exercise the code in question, -# but there are no results that can be checked. +# but there are no results that can be checked. # # Copyright (c) 1996-1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. @@ -141,7 +141,7 @@ test winfont-5.1 {Tk_MeasureChars procedure: unbounded right margin} -constraint update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] - + .t.l config -wrap 0 -text "000000" list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \ [expr {[winfo reqheight .t.l] eq $ay}] @@ -160,7 +160,7 @@ test winfont-5.2 {Tk_MeasureChars procedure: static width buffer exceeded} -cons update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] - + .t.l config -wrap 100000 -text "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" list [expr {[winfo reqwidth .t.l] eq 256*$ax}] \ [expr {[winfo reqheight .t.l] eq $ay}] @@ -179,7 +179,7 @@ test winfont-5.3 {Tk_MeasureChars procedure: all chars did fit} -constraints { update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] - + .t.l config -wrap [expr {$ax*10}] -text "00000000" list [expr {[winfo reqwidth .t.l] eq 8*$ax}] \ [expr {[winfo reqheight .t.l] eq $ay}] @@ -198,7 +198,7 @@ test winfont-5.4 {Tk_MeasureChars procedure: not all chars fit} -constraints { update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] - + .t.l config -wrap [expr {$ax*6}] -text "00000000" list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \ [expr {[winfo reqheight .t.l] eq 2*$ay}] @@ -234,7 +234,7 @@ test winfont-5.6 {Tk_MeasureChars procedure: at least one char on line} -constra update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] - + .t.l config -text "000000" -wrap 1 list [expr {[winfo reqwidth .t.l] eq $ax}] \ [expr {[winfo reqheight .t.l] eq 6*$ay}] @@ -253,7 +253,7 @@ test winfont-5.7 {Tk_MeasureChars procedure: whole words} -constraints { update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] - + .t.l config -wrap [expr {$ax*8}] -text "000000 0000" list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \ [expr {[winfo reqheight .t.l] eq 2*$ay}] @@ -272,7 +272,7 @@ test winfont-5.8 {Tk_MeasureChars procedure: already saw space in line} -constra update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] - + .t.l config -wrap [expr {$ax*12}] -text "000000 0000000" list [expr {[winfo reqwidth .t.l] eq 7*$ax}] \ [expr {[winfo reqheight .t.l] eq 2*$ay}] @@ -291,7 +291,7 @@ test winfont-5.9 {Tk_MeasureChars procedure: internal spaces significant} -const update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] - + .t.l config -wrap [expr {$ax*12}] -text "000 00 00000" list [expr {[winfo reqwidth .t.l] eq 7*$ax}] \ [expr {[winfo reqheight .t.l] eq 2*$ay}] @@ -310,7 +310,7 @@ test winfont-5.10 {Tk_MeasureChars procedure: make first part of word fit} -cons update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] - + .t.l config -wrap [expr {$ax*12}] -text "0000000000000000" list [expr {[winfo reqwidth .t.l] eq 12*$ax}] \ [expr {[winfo reqheight .t.l] eq 2*$ay}] @@ -327,7 +327,7 @@ test winfont-5.11 {Tk_MeasureChars procedure: check for kerning} -constraints { -text "0" -font systemfixed pack .t.l update - + set font [.t.l cget -font] .t.l config -font {{MS Sans Serif} 8} -text "W" set width [winfo reqwidth .t.l] diff --git a/tests/winMenu.test b/tests/winMenu.test index ce2069f..b77e9a9 100644 --- a/tests/winMenu.test +++ b/tests/winMenu.test @@ -481,7 +481,7 @@ test winMenu-11.3 {TkWinHandleMenuEvent - WM_COMMAND} -constraints { "error 1" (menu invoke)}} {} {}} - + # Can't test WM_MENUCHAR test winMenu-11.4 {TkWinHandleMenuEvent - WM_MEASUREITEM} -constraints { @@ -788,7 +788,7 @@ test winMenu-22.1 {DrawMenuUnderline} -constraints win -setup { .m1 add command -label foo -underline 0 set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] -} -result {{} {}} +} -result {{} {}} test winMenu-23.1 {Don't know how to test MenuKeyBindProc} -constraints { @@ -1343,7 +1343,7 @@ test winMenu-32.19 {TkpComputeStandardMenuGeometry - three columns} -constraints .m1 add command -label four .m1 add command -label five -columnbreak 1 .m1 add command -label six - list [update idletasks] [destroy .m1] + list [update idletasks] [destroy .m1] } -result {{} {}} diff --git a/tests/winfo.test b/tests/winfo.test index 49a92a6..51be80d 100644 --- a/tests/winfo.test +++ b/tests/winfo.test @@ -11,6 +11,8 @@ namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands +testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] + # eatColors -- # Creates a toplevel window and allocates enough colors in it to # use up all the slots in the colormap. @@ -291,7 +293,7 @@ test winfo-9.2 {"winfo viewable" command} -body { test winfo-9.3 {"winfo viewable" command} -body { winfo viewable . } -result {1} -test winfo-9.4 {"winfo viewable" command} -body { +test winfo-9.4 {"winfo viewable" command} -constraints failsOnUbuntu -body { wm iconify . winfo viewable . } -cleanup { @@ -320,7 +322,7 @@ test winfo-9.6 {"winfo viewable" command} -setup { } -cleanup { deleteWindows } -result {0 0} -test winfo-9.7 {"winfo viewable" command} -setup { +test winfo-9.7 {"winfo viewable" command} -constraints failsOnUbuntu -setup { deleteWindows } -body { frame .f1 -width 100 -height 100 -relief raised -bd 2 diff --git a/tests/wm.test b/tests/wm.test index faf34af..1bf56da 100644 --- a/tests/wm.test +++ b/tests/wm.test @@ -1527,7 +1527,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 -body { + overrideredirect toplevel on unix} -constraints {x11 failsOnUbuntu} -body { toplevel .t tkwait visibility .t wm overrideredirect .t 1 @@ -1726,7 +1726,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} -body { + when mapped if toplevel is iconic} -constraints failsOnUbuntu -body { toplevel .top wm iconify .top update @@ -1738,7 +1738,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 toplevel is iconic} -body { + is withdrawn if toplevel is iconic} -constraints failsOnUbuntu -body { toplevel .top raiseDelay wm iconify .top -- cgit v0.12