summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-02-19 12:48:32 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-02-19 12:48:32 (GMT)
commit76acfc3d9d190b8c24dfddc364e45f0ecf5eb5c1 (patch)
treed37e3fddbc707331cd8ba2f5f2f6f3649cd5239b /tests
parentdce78bcb0455e180116b61b634496b64c6e5254d (diff)
parentfbc43284e28780ef359f599b6da2f7f3ed1d930a (diff)
downloadtk-76acfc3d9d190b8c24dfddc364e45f0ecf5eb5c1.zip
tk-76acfc3d9d190b8c24dfddc364e45f0ecf5eb5c1.tar.gz
tk-76acfc3d9d190b8c24dfddc364e45f0ecf5eb5c1.tar.bz2
TIP #686: Make NextWord/SelectNextWord behavior platform-independant
Diffstat (limited to 'tests')
-rw-r--r--tests/spinbox.test11
-rw-r--r--tests/ttk/spinbox.test11
2 files changed, 18 insertions, 4 deletions
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 4187966..6cb52e9 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -3892,15 +3892,22 @@ test spinbox-25.3 {Bugs [2a32225cd1] and [9fa3e08243]} -setup {
destroy .s
pack [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
- .s get
+ 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 }
+} -result {{A sample } text}
# Collected comments about lacks from the test
# XXX Still need to write tests for SpinboxBlinkProc, SpinboxFocusProc,
diff --git a/tests/ttk/spinbox.test b/tests/ttk/spinbox.test
index 0a3f943..1f32049 100644
--- a/tests/ttk/spinbox.test
+++ b/tests/ttk/spinbox.test
@@ -291,15 +291,22 @@ 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
- .s get
+ 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 }
+} -result {{A sample } text}
# nostomp: NB intentional difference between ttk::spinbox and tk::spinbox;