aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorlonerover <pathfinder1644@yahoo.com>2017-01-09 11:00:56 +0800
committerlonerover <pathfinder1644@yahoo.com>2017-01-09 11:06:11 +0800
commit6f285226a9cc0e24bcb77a3213035cd26170ddb4 (patch)
tree40ed55c9147e701ebf3aa49902bc9d1b92bee258 /src/nvim/testdir
parent7486e7586d94c85f04e50ac7429acedc80f9da2f (diff)
downloadrneovim-6f285226a9cc0e24bcb77a3213035cd26170ddb4.tar.gz
rneovim-6f285226a9cc0e24bcb77a3213035cd26170ddb4.tar.bz2
rneovim-6f285226a9cc0e24bcb77a3213035cd26170ddb4.zip
vim-patch:7.4.2300
Problem: Get warning for deleting autocommand group when the autocommand using the group is scheduled for deletion. (Pavol Juhas) Solution: Check for deleted autocommand. https://github.com/vim/vim/commit/5c80908ced601be6db7554a147cdb0f98ac8daa1
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_autocmd.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
index d856d3296a..6db3bf76d3 100644
--- a/src/nvim/testdir/test_autocmd.vim
+++ b/src/nvim/testdir/test_autocmd.vim
@@ -152,6 +152,11 @@ func Test_early_bar()
call assert_equal(1, len(split(execute('au vimBarTest'), "\n")))
endfunc
+func RemoveGroup()
+ autocmd! StartOK
+ augroup! StartOK
+endfunc
+
func Test_augroup_warning()
augroup TheWarning
au VimEnter * echo 'entering'
@@ -167,4 +172,14 @@ func Test_augroup_warning()
augroup Another
augroup END
call assert_true(match(execute('au VimEnter'), "-Deleted-.*VimEnter") >= 0)
+
+ " no warning for postpone aucmd delete
+ augroup StartOK
+ au VimEnter * call RemoveGroup()
+ augroup END
+ call assert_true(match(execute('au VimEnter'), "StartOK.*VimEnter") >= 0)
+ redir => res
+ doautocmd VimEnter
+ redir END
+ call assert_true(match(res, "W19:") < 0)
endfunc