diff options
author | fvogel <fvogelnew1@free.fr> | 2022-10-17 19:47:49 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2022-10-17 19:47:49 (GMT) |
commit | 981d42a53a17356a5965a039eecccd82d1aebb48 (patch) | |
tree | b3c7cb3ed6400fd1b8baf7193f27dce03c93d16a /tests/frame.test | |
parent | 2f576289dc210ca386257e2e4248ccd81dc420bc (diff) | |
parent | 87ac61a50e646b5bf6406c7e504838892550cbcc (diff) | |
download | tk-981d42a53a17356a5965a039eecccd82d1aebb48.zip tk-981d42a53a17356a5965a039eecccd82d1aebb48.tar.gz tk-981d42a53a17356a5965a039eecccd82d1aebb48.tar.bz2 |
Merge core-8-6-branch that just received changes from unstable_tests branch, and fix conflicts in frame.test. This commit stabilizes several more tests that could sporadically fail on macOS. No test expected results were changed.
Diffstat (limited to 'tests/frame.test')
-rw-r--r-- | tests/frame.test | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/tests/frame.test b/tests/frame.test index f85ebc0..3ca4b1f 100644 --- a/tests/frame.test +++ b/tests/frame.test @@ -406,6 +406,31 @@ test frame-2.11 {toplevel configuration options} -constraints nonwin -setup { } -cleanup { deleteWindows } -result {-use use Use {} {}} +test frame-2.10 {toplevel configuration options} -constraints { + nonwin +} -setup { + deleteWindows +} -body { + catch {destroy .t} + toplevel .t -width 200 -height 100 + wm geometry .t +0+0 + .t configure -use 0x44022 +} -cleanup { + deleteWindows +} -returnCodes error -result {can't modify -use option after widget is created} +test frame-2.11 {toplevel configuration options} -constraints { + nonwin +} -setup { + deleteWindows +} -body { + catch {destroy .t} + toplevel .t -width 200 -height 100 + wm geometry .t +0+0 + catch {.t configure -use 0x44022} + .t configure -use +} -cleanup { + deleteWindows +} -result {-use use Use {} {}} test frame-2.12 {toplevel configuration options} -setup { deleteWindows } -body { @@ -655,12 +680,6 @@ test frame-3.9 {TkCreateFrame procedure, -use option} -constraints { [expr {[winfo rooty .x] - [winfo rooty .t]}] \ [winfo width .t] [winfo height .t] } -cleanup { - # This call to update idletasks was added to prevent a crash that was - # observed on OSX 10.12 (Sierra) only. Any change, such as using the - # Development version to make debugging symbols available, adding a print - # statement, or calling update idletasks here, would make the test pass - # with no segfault. - update idletasks deleteWindows } -result {0 0 140 300} test frame-3.10 {TkCreateFrame procedure, -use option} -constraints { @@ -1028,7 +1047,7 @@ test frame-9.1 {MapFrame procedure} -setup { toplevel .t -width 100 -height 400 wm geometry .t +0+0 set result [winfo ismapped .t] - update idletasks + update lappend result [winfo ismapped .t] } -cleanup { deleteWindows @@ -1053,7 +1072,7 @@ test frame-9.3 {MapFrame procedure, window deleted while mapping} -setup { frame .t2.f -width 50 -height 50 bind .t2.f <Configure> {destroy .t} pack .t2.f -side top - update idletasks + update winfo exists .t } -cleanup { deleteWindows @@ -1141,7 +1160,6 @@ test frame-12.2 {FrameWorldChanged procedure} -setup { } -result {1 1 1 1 1 1 1 1 1 1 1 1} test frame-12.3 {FrameWorldChanged procedure} -setup { deleteWindows - update idletasks } -body { # Check reaction on font change font create myfont -family courier -size 10 @@ -1152,7 +1170,8 @@ test frame-12.3 {FrameWorldChanged procedure} -setup { set h1 [font metrics myfont -linespace] set y1 [winfo y .f.f] font configure myfont -size 20 - update + update ; # services the "TheWorldHasChanged" event, queues "TkWorldChanged" events + update ; # services the queued "TkWorldChanged" events set h2 [font metrics myfont -linespace] set y2 [winfo y .f.f] expr {($h2 - $h1) - ($y2 - $y1)} |