summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-05-28 09:33:11 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-05-28 09:33:11 (GMT)
commit30529ae3c9cb4ba814bcc609791bdb24a8ce12dc (patch)
tree207b6a318f6defa4f9b73e722bc27a02f6f1e53b /tests
parentd4e2fda1837c59fa8cf3499154cd7a005e6bb945 (diff)
parentf4a0fde006c321df81b8e0dd2569e54b5c63e870 (diff)
downloadtk-30529ae3c9cb4ba814bcc609791bdb24a8ce12dc.zip
tk-30529ae3c9cb4ba814bcc609791bdb24a8ce12dc.tar.gz
tk-30529ae3c9cb4ba814bcc609791bdb24a8ce12dc.tar.bz2
merge trunk
Diffstat (limited to 'tests')
-rw-r--r--tests/event.test5
-rw-r--r--tests/text.test20
-rw-r--r--tests/ttk/treeview.test7
-rw-r--r--tests/unixWm.test10
-rw-r--r--tests/wm.test6
5 files changed, 40 insertions, 8 deletions
diff --git a/tests/event.test b/tests/event.test
index f08bac0..4cbd529 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -856,7 +856,9 @@ test event-9.1 {enter . window by destroying a toplevel - bug b1d115fa60} -setup
_pause 200
toplevel .top2 -width 200 -height 200
wm geometry .top2 +[expr {[winfo rootx .]+50}]+[expr {[winfo rooty .]+50}]
+ update idletasks
wm deiconify .top2
+ update idletasks
raise .top2
_pause 400
event generate .top2 <Motion> -warp 1 -x 50 -y 50
@@ -864,6 +866,7 @@ test event-9.1 {enter . window by destroying a toplevel - bug b1d115fa60} -setup
bind . <Enter> {lappend res %W}
set res [list ]
destroy .top2
+ update idletasks
_pause 200
set res
} -cleanup {
@@ -884,7 +887,9 @@ test event-9.2 {enter toplevel window by destroying a toplevel - bug b1d115fa60}
_pause 200
toplevel .top2 -width 200 -height 200
wm geometry .top2 +[expr {[winfo rootx .top1]+50}]+[expr {[winfo rooty .top1]+50}]
+ update idletasks
wm deiconify .top2
+ update idletasks
raise .top2
_pause 400
event generate .top2 <Motion> -warp 1 -x 50 -y 50
diff --git a/tests/text.test b/tests/text.test
index 3f03418..11d8b57 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -6674,7 +6674,7 @@ test text-27.15b {<<Selection>> virtual event on <<PasteSelection>> inside widge
bind .t <<Selection>> "set ::retval <<Selection>>_fired"
update
set ::retval no_<<Selection>>_event_fired
- event generate .t <<PasteSelection>> -x 15 -y 3
+ event generate .t <<PasteSelection>> -x 15 -y [lindex [.t dlineinfo 1.0] 1]
update
set ::retval
} -cleanup {
@@ -6688,7 +6688,7 @@ test text-27.15c {No <<Selection>> virtual event on <<PasteSelection>> outside w
bind .t <<Selection>> "set ::retval <<Selection>>_fired"
update
set ::retval no_<<Selection>>_event_fired
- event generate .t <<PasteSelection>> -x 15 -y 80
+ event generate .t <<PasteSelection>> -x 15 -y [lindex [.t dlineinfo 2.0] 1]
update
set ::retval
} -cleanup {
@@ -7789,6 +7789,22 @@ test text-37.1 "bug #dd9667635d: text anchor not set" -setup {
interp bgerror {} $save
unset -nocomplain save ::my_error
} -result {}
+
+
+test text-38.1 {Extending selection with mouse going outside the widget - Bug a9cf210a42} -setup {
+ pack [text .t -width 40 -height 10]
+ for {set n 1} {$n <= 5} {incr n} {
+ .t insert end "This is line $i of text\n"
+ }
+ update
+} -body {
+ event generate .t <Button-1> -x 50 -y 50
+ event generate .t <B1-Motion> -x 50 -y -50
+ .t index sel.first
+} -cleanup {
+ destroy .t
+} -result {1.0}
+
# cleanup
cleanupTests
diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test
index da25c1c..5f2cc84 100644
--- a/tests/ttk/treeview.test
+++ b/tests/ttk/treeview.test
@@ -1369,6 +1369,13 @@ test treeview-bc602049ab "treeview with custom background does not change size w
image delete tvbg
} -result {1}
+test treeview-6ee162c3d9 "style configure Treeview -rowheight 0" -setup {
+ tvSetupWithItems
+} -body {
+ ttk::style configure Treeview -rowheight 0 ; # shall not crash
+ update
+} -result {}
+
test treeview-column0-leak "Test for leak in tree column" -setup {
destroy .ttt
set heading [string range _Hej_ 1 3]
diff --git a/tests/unixWm.test b/tests/unixWm.test
index 17e8bc0..105edf4 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -2067,7 +2067,9 @@ test unixWm-51.5 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable}
} {.raise1 .raise3}
deleteWindows
test unixWm-51.6 {TkWmRestackToplevel procedure, window to be stacked isn't mapped} unix {
+ wm geometry . +300+300
destroy .t
+ update idletasks
toplevel .t -width 200 -height 200 -bg green
tkwait visibility .t
wm geometry .t +0+0
@@ -2530,17 +2532,17 @@ test unixWm-59.3 {exit processing} unix {
# the only thing we can really test here is the syntax.
#
if {[tk windowingsystem] eq "aqua"} {
- set result_60_1 {-alpha 1.0 -fullscreen 0 -modified 0 -notify 0\
- -titlepath {} -topmost 0 -transparent 0\
- -type unsupported}
+ set match_60_1 glob
+ set result_60_1 {-alpha 1.0 -appearance auto -buttons {close miniaturize zoom} -fullscreen 0 -isdark [01] -modified 0 -notify 0 -titlepath {} -topmost 0 -transparent 0 -stylemask {titled closable miniaturizable resizable} -class nswindow -tabbingid .t -tabbingmode auto -type unsupported}
} else {
+ set match_60_1 exact
set result_60_1 {-alpha 1.0 -fullscreen 0 -topmost 0 -type {} -zoomed 0}
}
test unixWm-60.1 {wm attributes - test} -constraints unix -body {
destroy .t
toplevel .t
wm attributes .t
-} -result $result_60_1
+} -match $match_60_1 -result $result_60_1
test unixWm-60.2 {wm attributes - test} -constraints unix -body {
destroy .t
diff --git a/tests/wm.test b/tests/wm.test
index f3436e1..9d60eb4 100644
--- a/tests/wm.test
+++ b/tests/wm.test
@@ -204,10 +204,12 @@ test wm-attributes-1.2.3 {usage} -constraints win -returnCodes error -body {
test wm-attributes-1.2.4 {usage} -constraints {unix notAqua} -returnCodes error -body {
wm attributes . _
} -result {bad attribute "_": must be -alpha, -fullscreen, -topmost, -type, or -zoomed}
+if {[tk windowingsystem] eq "aqua"} {
+ set result_1_2_5 {bad attribute "_": must be -alpha, -appearance, -buttons, -fullscreen, -isdark, -modified, -notify, -titlepath, -topmost, -transparent, -stylemask, -class, -tabbingid, -tabbingmode, or -type}
+} else {set result_1_2_5 {bad attribute "_": must be -alpha, -fullscreen, -modified, -notify, -titlepath, -topmost, -transparent, or -type}}
test wm-attributes-1.2.5 {usage} -constraints aqua -returnCodes error -body {
wm attributes . _
-} -result {bad attribute "_": must be -alpha, -fullscreen, -modified, -notify, -titlepath, -topmost, -transparent, or -type}
-
+} -result $result_1_2_5
### wm client ###
test wm-client-1.1 {usage} -returnCodes error -body {