summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-04-07 20:18:24 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-04-07 20:18:24 (GMT)
commita49d18f50fd597f7b77eae71f3df70469136f839 (patch)
tree60d9513cf8af71300909b958191c939cc0592552
parent273fb7b1e51432f39fd23d82f9e5454273230090 (diff)
downloadtk-a49d18f50fd597f7b77eae71f3df70469136f839.zip
tk-a49d18f50fd597f7b77eae71f3df70469136f839.tar.gz
tk-a49d18f50fd597f7b77eae71f3df70469136f839.tar.bz2
Tests for [.t edit undodepth/redodepth]
-rw-r--r--tests/text.test28
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/text.test b/tests/text.test
index a778b79..da246f9 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -6188,7 +6188,7 @@ test text-27.2 {TextEditCmd procedure, argument parsing} -body {
.t edit gorp
} -cleanup {
destroy .t
-} -returnCodes {error} -result {bad edit option "gorp": must be modified, redo, reset, separator, or undo}
+} -returnCodes {error} -result {bad edit option "gorp": must be modified, redo, redodepth, reset, separator, undo, or undodepth}
test text-27.3 {TextEditUndo procedure, undoing changes} -body {
text .t -undo 1
pack .t
@@ -6456,6 +6456,32 @@ test text-27.22 {patch 1669632 (v) - <<Clear>> is atomic} -setup {
} -cleanup {
destroy .top.t .top
} -result "This A an example text"
+test text-27.24 {TextEditCmd procedure, undo and redo stack depths} -setup {
+ destroy .t
+ set res {}
+} -body {
+ text .t -undo false -autoseparators false
+ lappend res [.t edit undodepth] [.t edit redodepth]
+ .t configure -undo true
+ lappend res [.t edit undodepth] [.t edit redodepth]
+ .t insert end "DO\n"
+ .t edit separator
+ .t insert end "IT\n"
+ .t insert end "YOURSELF\n"
+ .t edit separator
+ lappend res [.t edit undodepth] [.t edit redodepth]
+ .t edit undo
+ lappend res [.t edit undodepth] [.t edit redodepth]
+ .t configure -undo false
+ lappend res [.t edit undodepth] [.t edit redodepth]
+ .t configure -undo true
+ lappend res [.t edit undodepth] [.t edit redodepth]
+ .t edit redo
+ lappend res [.t edit undodepth] [.t edit redodepth]
+} -cleanup {
+ destroy .t
+} -result {0 0 0 0 2 0 1 1 0 0 1 1 2 0}
+
test text-28.1 {bug fix - 624372, ControlUtfProc long lines} -body {
pack [text .t -wrap none]