diff options
author | fvogel <fvogelnew1@free.fr> | 2016-05-02 20:21:21 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-05-02 20:21:21 (GMT) |
commit | fd415e01f99a7787f9f26c40e9757c64dbe09f06 (patch) | |
tree | 08ab6e72a5605f87b608c52b0b2644498f5478f4 /tests | |
parent | dd7c680bf0627dc809b4b205ad1258100deaa466 (diff) | |
parent | b1abab58282cc8ff89e73762114369e7a11ce07f (diff) | |
download | tk-fd415e01f99a7787f9f26c40e9757c64dbe09f06.zip tk-fd415e01f99a7787f9f26c40e9757c64dbe09f06.tar.gz tk-fd415e01f99a7787f9f26c40e9757c64dbe09f06.tar.bz2 |
Merged core-8-6-branch
Diffstat (limited to 'tests')
-rw-r--r-- | tests/button.test | 16 | ||||
-rw-r--r-- | tests/listbox.test | 1 | ||||
-rw-r--r-- | tests/text.test | 40 |
3 files changed, 48 insertions, 9 deletions
diff --git a/tests/button.test b/tests/button.test index 984fd43..6d924f6 100644 --- a/tests/button.test +++ b/tests/button.test @@ -3750,7 +3750,7 @@ test button-12.1 {button widget vs hidden commands} -body { destroy .b } -result {1} -test button-13.1 {size behaviouor: label} -setup { +test button-13.1 {size behavior: label} -setup { label .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} label .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} label .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -3769,7 +3769,7 @@ test button-13.1 {size behaviouor: label} -setup { } -cleanup { destroy .a .b .c } -result {1 1 1} -test button-13.2 {size behaviouor: label} -setup { +test button-13.2 {size behavior: label} -setup { label .a -borderwidth 2 -highlightthickness 2 -font {Arial 20} label .b -borderwidth 2 -highlightthickness 2 -font {Arial 20} label .c -borderwidth 2 -highlightthickness 2 -font {Arial 20} @@ -3789,7 +3789,7 @@ test button-13.2 {size behaviouor: label} -setup { destroy .a .b .c } -result {1 1 1} -test button-13.3 {size behaviouor: button} -setup { +test button-13.3 {size behavior: button} -setup { button .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} button .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -3808,7 +3808,7 @@ test button-13.3 {size behaviouor: button} -setup { } -cleanup { destroy .a .b .c } -result {1 1 1} -test button-13.4 {size behaviouor: button} -setup { +test button-13.4 {size behavior: button} -setup { button .a -borderwidth 2 -highlightthickness 2 -font {Arial 20} button .b -borderwidth 2 -highlightthickness 2 -font {Arial 20} button .c -borderwidth 2 -highlightthickness 2 -font {Arial 20} @@ -3828,7 +3828,7 @@ test button-13.4 {size behaviouor: button} -setup { destroy .a .b .c } -result {1 1 1} -test button-13.5 {size behaviouor: radiobutton} -setup { +test button-13.5 {size behavior: radiobutton} -setup { radiobutton .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} radiobutton .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} radiobutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -3848,7 +3848,7 @@ test button-13.5 {size behaviouor: radiobutton} -setup { destroy .a .b .c } -result {1 1 1} -test button-13.6 {size behaviouor: radiobutton} -setup { +test button-13.6 {size behavior: radiobutton} -setup { radiobutton .a -borderwidth 2 -highlightthickness 2 -font {Arial 20} radiobutton .b -borderwidth 2 -highlightthickness 2 -font {Arial 20} radiobutton .c -borderwidth 2 -highlightthickness 2 -font {Arial 20} @@ -3868,7 +3868,7 @@ test button-13.6 {size behaviouor: radiobutton} -setup { destroy .a .b .c } -result {1 1 1} -test button-13.7 {size behaviouor: checkbutton} -setup { +test button-13.7 {size behavior: checkbutton} -setup { checkbutton .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} checkbutton .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -3888,7 +3888,7 @@ test button-13.7 {size behaviouor: checkbutton} -setup { destroy .a .b .c } -result {1 1 1} -test button-13.8 {size behaviouor: checkbutton} -setup { +test button-13.8 {size behavior: checkbutton} -setup { checkbutton .a -borderwidth 2 -highlightthickness 2 -font {Arial 20} checkbutton .b -borderwidth 2 -highlightthickness 2 -font {Arial 20} checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Arial 20} diff --git a/tests/listbox.test b/tests/listbox.test index 76a4349..407420c 100644 --- a/tests/listbox.test +++ b/tests/listbox.test @@ -3170,6 +3170,7 @@ test listbox-31.2 {<<ListboxSelect>> event on lost selection} -setup { focus -force .l event generate .l <1> -x 5 -y 5 ; # <<ListboxSelect>> fires selection clear ; # <<ListboxSelect>> fires again + update set res } -cleanup { destroy .l diff --git a/tests/text.test b/tests/text.test index a778b79..f217bcf 100644 --- a/tests/text.test +++ b/tests/text.test @@ -3053,6 +3053,25 @@ test text-11a.41 {"sync" "pendingsync" and <<WidgetViewSync>>} -setup { destroy .top.yt .top } -result {Sync:0 Pending:1 Sync:1 Pending:0} +test text-11a.51 {<<WidgetViewSync>> calls TkSendVirtualEvent(), + NOT Tk_HandleEvent(). + Bug [b362182e45704dd7bbd6aed91e48122035ea3d16]} -setup { + destroy .top.t .top +} -body { + set res {} + toplevel .top + pack [text .top.t] + for {set i 1} {$i < 10000} {incr i} { + .top.t insert end "Hello world!\n" + } + bind .top.t <<WidgetViewSync>> {destroy .top.t} + .top.t tag add mytag 1.5 8000.8 ; # shall not crash + update + set res "Still doing fine!" +} -cleanup { + destroy .top.t .top +} -result {Still doing fine!} + test text-12.1 {TextWidgetCmd procedure, "index" option} -setup { text .t } -body { @@ -6280,7 +6299,7 @@ test text-27.11 {TextEditCmd procedure, set modified flag repeat} -setup { # Shouldn't require [update idle] to trigger event [Bug 1809538] lappend ::retval [.t edit modified] .t edit modified 1 - update idletasks + update lappend ::retval [.t edit modified] .t edit modified 1 ; # binding should only fire once [Bug 1799782] update idletasks @@ -6295,6 +6314,7 @@ test text-27.12 {<<Modified>> virtual event} -body { bind .t <<Modified>> "set ::retval modified" update idletasks .t insert end "nothing special\n" + update return $::retval } -cleanup { destroy .t @@ -6305,6 +6325,7 @@ test text-27.13 {<<Modified>> virtual event - insert before Modified} -body { bind .t <<Modified>> { set ::retval [.t get 1.0 end-1c] } update idletasks .t insert end "nothing special" + update return $::retval } -cleanup { destroy .t @@ -6317,10 +6338,26 @@ test text-27.14 {<<Modified>> virtual event - delete before Modified} -body { .t insert end "nothing special" .t edit modified 0 .t delete 1.0 1.2 + update set ::retval } -cleanup { destroy .t } -result {thing special} +test text-27.14a {<<Modified>> virtual event - propagation to peers} -body { +# Bug [fd3a4dc111], <<Modified>> event is not always sent to peers + set ::retval 0 + text .t -undo 1 + .t peer create .tt + pack .t .tt + bind .t <<Modified>> {incr ::retval} + bind .tt <<Modified>> {incr ::retval} + .t insert end "This increments ::retval once for each peer, i.e. twice." + .t edit modified 0 ; # shall increment twice as well, not just once + update + set ::retval +} -cleanup { + destroy .t .tt +} -result {4} test text-27.15 {<<Selection>> virtual event} -body { set ::retval no_selection pack [text .t -undo 1] @@ -6328,6 +6365,7 @@ test text-27.15 {<<Selection>> virtual event} -body { update idletasks .t insert end "nothing special\n" .t tag add sel 1.0 1.1 + update set ::retval } -cleanup { destroy .t |