aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
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