summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-05-12 21:35:47 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-05-12 21:35:47 (GMT)
commitb646ae45954e035debea24d3f1772a8dda43ced8 (patch)
tree06b645cb9b262bd7e9ca6daf4507f91dd4702a14 /tests
parent85931fc019f97ba08c56324caa838a3526b7273b (diff)
downloadtk-b646ae45954e035debea24d3f1772a8dda43ced8.zip
tk-b646ae45954e035debea24d3f1772a8dda43ced8.tar.gz
tk-b646ae45954e035debea24d3f1772a8dda43ced8.tar.bz2
Added test for the <<UndoStack>> event
Diffstat (limited to 'tests')
-rw-r--r--tests/text.test43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/text.test b/tests/text.test
index 9be243d..0ec69d0 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -6519,6 +6519,49 @@ test text-27.24 {TextEditCmd procedure, canundo and canredo} -setup {
} -cleanup {
destroy .t
} -result {0 0 0 0 1 0 1 1 0 0 1 1 1 0}
+test text-27.25 {<<UndoStack>> virtual event} -setup {
+ destroy .t
+ set res {}
+ set nbUS 0
+} -body {
+ text .t -undo false -autoseparators false
+ bind .t <<UndoStack>> {incr nbUS}
+ update ; lappend res $nbUS
+ .t configure -undo true
+ update ; lappend res $nbUS
+ .t insert end "DO\n"
+ .t edit separator
+ .t insert end "IT\n"
+ .t insert end "YOURSELF\n"
+ .t edit separator
+ .t insert end "MAN\n"
+ .t edit separator
+ update ; lappend res $nbUS
+ .t edit undo
+ update ; lappend res $nbUS
+ .t edit redo
+ update ; lappend res $nbUS
+ .t edit undo
+ update ; lappend res $nbUS
+ .t edit undo
+ update ; lappend res $nbUS
+ .t edit undo
+ update ; lappend res $nbUS
+ .t edit redo
+ update ; lappend res $nbUS
+ .t edit redo
+ update ; lappend res $nbUS
+ .t edit redo
+ update ; lappend res $nbUS
+ .t edit undo
+ update ; lappend res $nbUS
+ .t edit undo
+ update ; lappend res $nbUS
+ .t edit reset
+ update ; lappend res $nbUS
+} -cleanup {
+ destroy .t
+} -result {0 0 1 2 3 4 4 5 6 6 7 8 8 9}
test text-28.1 {bug fix - 624372, ControlUtfProc long lines} -body {