aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_undo.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-02-02 23:14:30 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-02-11 15:29:19 +0100
commit2de447b60c04fcaad3d762851c512b2545ea6bad (patch)
treeb8e83360138fefe879707ac6ef411e45d86fde9b /src/nvim/testdir/test_undo.vim
parent0a531ddf873202d258809207f6d85e09a5207b31 (diff)
downloadrneovim-2de447b60c04fcaad3d762851c512b2545ea6bad.tar.gz
rneovim-2de447b60c04fcaad3d762851c512b2545ea6bad.tar.bz2
rneovim-2de447b60c04fcaad3d762851c512b2545ea6bad.zip
vim-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 vim/vim#2256) https://github.com/vim/vim/commit/15993ce9210e8b8d4bc11e1d640f6447b18d3e6c
Diffstat (limited to 'src/nvim/testdir/test_undo.vim')
-rw-r--r--src/nvim/testdir/test_undo.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_undo.vim b/src/nvim/testdir/test_undo.vim
index 0f9f6c3310..f7d1d64ea3 100644
--- a/src/nvim/testdir/test_undo.vim
+++ b/src/nvim/testdir/test_undo.vim
@@ -266,3 +266,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