diff src/testdir/test_undo.vim @ 12686:aa658b33f25a v8.0.1221

patch 8.0.1221: still too many old style tests commit https://github.com/vim/vim/commit/15993ce9210e8b8d4bc11e1d640f6447b18d3e6c Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 26 20:21:44 2017 +0200 patch 8.0.1221: still too many old style tests Problem: Still too many old style tests. Solution: Convert a few more tests to new style. (Yegappan Lakshmanan, closes #2256)
author Christian Brabandt <cb@256bit.org>
date Thu, 26 Oct 2017 20:30:05 +0200
parents 1fad9675d8fd
children 73eb8a2d7f04
line wrap: on
line diff
--- 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