diff options
author | fvogel <fvogelnew1@free.fr> | 2024-01-28 08:55:18 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2024-01-28 08:55:18 (GMT) |
commit | 3b0766a0c0ae34bf03ac660bb06d9c35fb8eb1b7 (patch) | |
tree | 1b43a64e2535c213bc2e09ef5ee49e7957703ba3 /tests/ttk/spinbox.test | |
parent | 39d0e46160c3d7562f25775ac8c645216333134e (diff) | |
download | tk-3b0766a0c0ae34bf03ac660bb06d9c35fb8eb1b7.zip tk-3b0766a0c0ae34bf03ac660bb06d9c35fb8eb1b7.tar.gz tk-3b0766a0c0ae34bf03ac660bb06d9c35fb8eb1b7.tar.bz2 |
Add tests demonstrating bug [9fa3e08243]: Ctrl-Arrow binding for spinbox: unknown option '-show'. For Tk, spinbox-25.3 fails (as expected). For Ttk, spinbox-11.2 does not fail because the ttk::spinbox inherits the -show option of the ttk::entry widget, event though it's not used nor documented for ttk::spinbox. (Note: tests numbering mirror their counterparts in entry.test).
Diffstat (limited to 'tests/ttk/spinbox.test')
-rw-r--r-- | tests/ttk/spinbox.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ttk/spinbox.test b/tests/ttk/spinbox.test index 9c82cd7..4a22dfc 100644 --- a/tests/ttk/spinbox.test +++ b/tests/ttk/spinbox.test @@ -287,6 +287,27 @@ test spinbox-4.2 "Increment with duplicates in -values, no wrap" -setup { unset -nocomplain ::spinbox_test max } -result {one two three 4 5 two six six six two 5 4 three two one one one one} +test spinbox-11.2 {Bugs [2a32225cd1] and [9fa3e08243]} -setup { + destroy .s + pack [ttk::spinbox .s] + update + set res {} +} -body { + .s insert end "A sample text" + .s icursor end + event generate .s <<PrevWord>> ; # shall move insert to index 9 + .s delete insert end + lappend res [.s get] + .s delete 0 end + .s insert end "A sample text" + .s icursor 2 + event generate .s <<NextWord>> ; # shall move insert to index 9 + .s delete 0 insert + lappend res [.s get] +} -cleanup { + destroy .s +} -result {{A sample } text} + # nostomp: NB intentional difference between ttk::spinbox and tk::spinbox; # see also #1439266 |