From d60b9e28ecea5421fcb384737837748d9cd677df Mon Sep 17 00:00:00 2001 From: fvogel Date: Wed, 8 Jun 2016 13:23:22 +0000 Subject: Added test case text-27.26 for [.text edit undo/redo] return values --- tests/text.test | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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 {<> 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 { -- cgit v0.12