summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2019-04-13 16:44:20 (GMT)
committerfvogel <fvogelnew1@free.fr>2019-04-13 16:44:20 (GMT)
commit3a81c1fb68b1e2b976651df7359209916ea5be63 (patch)
tree939d58ae8bf527e39123d654b0f69f5c531d5e6f /tests
parentd95284c405fba9c6f6222e1af119f5ba73b4443a (diff)
downloadtk-3a81c1fb68b1e2b976651df7359209916ea5be63.zip
tk-3a81c1fb68b1e2b976651df7359209916ea5be63.tar.gz
tk-3a81c1fb68b1e2b976651df7359209916ea5be63.tar.bz2
Add test treeview-368fa4561e checking for non-regression regarding [368fa4561e]
Diffstat (limited to 'tests')
-rw-r--r--tests/ttk/treeview.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test
index aa7e64a..be82f68 100644
--- a/tests/ttk/treeview.test
+++ b/tests/ttk/treeview.test
@@ -636,4 +636,21 @@ test treeview-3085489-2 "tag remove, no -tags" -setup {
destroy .tv
} -result [list]
+test treeview-368fa4561e "indicators cannot be clicked on leafs" -setup {
+ pack [ttk::treeview .tv]
+ .tv insert {} end -id foo -text "<-- (1) Click the blank space to my left"
+ update
+} -body {
+ foreach {x y w h} [.tv bbox foo #0] {}
+ set res [.tv item foo -open]
+ # using $h even for x computation is intentional here in order to simulate
+ # a mouse click on the (invisible since we're on a leaf) indicator
+ event generate .tv <ButtonPress-1> \
+ -x [expr ($x + $h / 2)] \
+ -y [expr ($y + $h / 2)]
+ lappend res [.tv item foo -open]
+ .tv insert foo end -text "sub"
+ lappend res [.tv item foo -open]
+} -result {0 0 0}
+
tcltest::cleanupTests