diff options
author | fvogel <fvogelnew1@free.fr> | 2019-04-28 14:34:41 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-04-28 14:34:41 (GMT) |
commit | 8769a171d064001c6ee11448139a564f91bd29ca (patch) | |
tree | c5579b5594e5bdf3610d10e55c3ce28af1a63009 /tests/ttk | |
parent | 6afd4e02fc9f197853203afaa1df7347a989e8cf (diff) | |
download | tk-8769a171d064001c6ee11448139a564f91bd29ca.zip tk-8769a171d064001c6ee11448139a564f91bd29ca.tar.gz tk-8769a171d064001c6ee11448139a564f91bd29ca.tar.bz2 |
Add tests checking the scroll info correct update when xview / yview is called. All the new (or modified) tests fail in core-8-6-branch.
Diffstat (limited to 'tests/ttk')
-rw-r--r-- | tests/ttk/entry.test | 29 | ||||
-rw-r--r-- | tests/ttk/treeview.test | 12 |
2 files changed, 40 insertions, 1 deletions
diff --git a/tests/ttk/entry.test b/tests/ttk/entry.test index d95ef31..a920042 100644 --- a/tests/ttk/entry.test +++ b/tests/ttk/entry.test @@ -103,10 +103,37 @@ test entry-3.1 "bbox widget command" -body { test entry-3.2 "xview" -body { .e delete 0 end; .e insert end [string repeat "0" 40] - update idletasks set result [.e xview] } -result {0.0 0.5} +test entry-3.3 "xview" -body { + .e delete 0 end; + .e insert end abcdefghijklmnopqrstuvwxyz + .e xview end + set result [.e index @0] +} -result {7} + +test entry-3.4 "xview" -body { + .e delete 0 end; + .e insert end abcdefghijklmnopqrstuvwxyz + .e xview moveto 1.0 + set result [.e index @0] +} -result {7} + +test entry-3.5 "xview" -body { + .e delete 0 end; + .e insert end abcdefghijklmnopqrstuvwxyz + .e xview scroll 5 units + set result [.e index @0] +} -result {5} + +test entry-3.6 "xview" -body { + .e delete 0 end; + .e insert end [string repeat abcdefghijklmnopqrstuvwxyz 5] + .e xview scroll 2 pages + set result [.e index @0] +} -result {40} + test entry-3.last "Series 3 cleanup" -body { destroy .e } diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test index be82f68..a36e3d1 100644 --- a/tests/ttk/treeview.test +++ b/tests/ttk/treeview.test @@ -471,6 +471,18 @@ test treeview-9.0 "scroll callback - empty tree" -body { set ::scrolldata } -result [list 0.0 1.0] +test treeview-9.1 "scrolling" -setup { + pack [ttk::treeview .tree -show tree] -fill y + for {set i 1} {$i < 100} {incr i} { + .tree insert {} end -text $i + } +} -body { + .tree yview scroll 5 units + .tree identify item 2 2 +} -cleanup { + destroy .tree +} -result {I006} + ### identify tests: # proc identify* {tv comps args} { |