summaryrefslogtreecommitdiff
path: root/src/testdir/test_undo.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-10-26 20:21:44 +0200
committerBram Moolenaar <Bram@vim.org>2017-10-26 20:21:44 +0200
commit15993ce9210e8b8d4bc11e1d640f6447b18d3e6c (patch)
tree1c1558bba5fb9a3bd1cfa6d8d494aeca2bd83097 /src/testdir/test_undo.vim
parent235dddf1f4afe3a40047dbf2aca1bd177b7be18b (diff)
downloadvim-git-15993ce9210e8b8d4bc11e1d640f6447b18d3e6c.tar.gz
patch 8.0.1221: still too many old style testsv8.0.1221
Problem: Still too many old style tests. Solution: Convert a few more tests to new style. (Yegappan Lakshmanan, closes #2256)
Diffstat (limited to 'src/testdir/test_undo.vim')
-rw-r--r--src/testdir/test_undo.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_undo.vim b/src/testdir/test_undo.vim
index 06732af71..bda7a442f 100644
--- a/src/testdir/test_undo.vim
+++ b/src/testdir/test_undo.vim
@@ -273,3 +273,19 @@ func Test_undofile_earlier()
call delete('Xfile')
call delete('Xundofile')
endfunc
+
+" Test for undo working properly when executing commands from a register.
+" Also test this in an empty buffer.
+func Test_cmd_in_reg_undo()
+ enew!
+ let @a="Ox\<Esc>jAy\<Esc>kdd"
+ edit +/^$ test_undo.vim
+ normal @au
+ call assert_equal(0, &modified)
+ return
+ new
+ normal @au
+ call assert_equal(0, &modified)
+ only!
+ let @a=''
+endfunc