diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-29 14:08:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-29 14:08:27 -0400 |
| commit | a7205e2b70c1d36d9fdf46138357208306c714c6 (patch) | |
| tree | 6b017c15682a20a99f4bd814177fed5669995784 /src/nvim/testdir | |
| parent | 43956dea55a49a847a0f2e5d9e0f48384cb34635 (diff) | |
| parent | ca6a8ac93c6425e0480fc4b4efa8519701ce2394 (diff) | |
| download | rneovim-a7205e2b70c1d36d9fdf46138357208306c714c6.tar.gz rneovim-a7205e2b70c1d36d9fdf46138357208306c714c6.tar.bz2 rneovim-a7205e2b70c1d36d9fdf46138357208306c714c6.zip | |
Merge pull request #14673 from janlazo/vim-8.2.2898
vim-patch:8.2.{2898,2900}
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_writefile.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_writefile.vim b/src/nvim/testdir/test_writefile.vim index c7710ff198..6922e2185d 100644 --- a/src/nvim/testdir/test_writefile.vim +++ b/src/nvim/testdir/test_writefile.vim @@ -361,4 +361,25 @@ func Test_write_file_encoding() %bw! endfunc +" Check that buffer is written before triggering QuitPre +func Test_wq_quitpre_autocommand() + edit Xsomefile + call setline(1, 'hello') + split + let g:seq = [] + augroup Testing + au QuitPre * call add(g:seq, 'QuitPre - ' .. (&modified ? 'modified' : 'not modified')) + au BufWritePost * call add(g:seq, 'written') + augroup END + wq + call assert_equal(['written', 'QuitPre - not modified'], g:seq) + + augroup Testing + au! + augroup END + bwipe! + unlet g:seq + call delete('Xsomefile') +endfunc + " vim: shiftwidth=2 sts=2 expandtab |