diff options
author | fvogel <fvogelnew1@free.fr> | 2016-06-08 13:23:22 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-06-08 13:23:22 (GMT) |
commit | d60b9e28ecea5421fcb384737837748d9cd677df (patch) | |
tree | 6a44732eb840f5ee2f72701bed6deeee1c8d2156 /tests | |
parent | abdebd5b836480c1552c478a871c77b4668135ed (diff) | |
download | tk-d60b9e28ecea5421fcb384737837748d9cd677df.zip tk-d60b9e28ecea5421fcb384737837748d9cd677df.tar.gz tk-d60b9e28ecea5421fcb384737837748d9cd677df.tar.bz2 |
Added test case text-27.26 for [.text edit undo/redo] return values
Diffstat (limited to 'tests')
-rw-r--r-- | tests/text.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/text.test b/tests/text.test index 0ec69d0..abbcfe5 100644 --- a/tests/text.test +++ b/tests/text.test @@ -6562,6 +6562,36 @@ test text-27.25 {<<UndoStack>> virtual event} -setup { } -cleanup { destroy .t } -result {0 0 1 2 3 4 4 5 6 6 7 8 8 9} +test text-27.26 {edit undo and edit redo return ranges} -setup { + destroy .t + set res {} +} -body { + text .t -undo true -autoseparators false + .t insert end "Hello " + .t edit separator + .t insert end "World!\n" + .t insert 1.6 "GREAT " + .t insert end "Another edit here!!" + lappend res [.t edit undo] + lappend res [.t edit redo] + .t edit separator + .t delete 1.6 + .t delete 1.9 1.10 + .t insert 1.9 L + lappend res [.t edit undo] + lappend res [.t edit redo] + .t replace 1.6 1.10 Tcl/Tk + .t replace 2.8 2.12 "one bites the dust" + lappend res [.t edit undo] + lappend res [.t edit redo] +} -cleanup { + destroy .t +} -result [list {2.0 2.19 1.6 1.12 1.6 2.0} \ + {1.6 2.0 1.6 1.12 2.0 2.19} \ + {1.9 1.10 1.9 1.10 1.6 1.7} \ + {1.6 1.7 1.9 1.10 1.9 1.10} \ + {2.8 2.26 2.8 2.12 1.6 1.12 1.6 1.10} \ + {1.6 1.10 1.6 1.12 2.8 2.12 2.8 2.26} ] test text-28.1 {bug fix - 624372, ControlUtfProc long lines} -body { |