aboutsummaryrefslogtreecommitdiff
path: root/test/old
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-11 08:09:13 +0800
committerGitHub <noreply@github.com>2023-05-11 08:09:13 +0800
commit9d306ac6b79c13b5f42ea4e22c6f8ccc628f6a6a (patch)
tree2913703cd2da4908e60e7fe59a88957ef274076a /test/old
parentac1aee99bc76c0036aa0ccf7b9eda48fcf46ac11 (diff)
downloadrneovim-9d306ac6b79c13b5f42ea4e22c6f8ccc628f6a6a.tar.gz
rneovim-9d306ac6b79c13b5f42ea4e22c6f8ccc628f6a6a.tar.bz2
rneovim-9d306ac6b79c13b5f42ea4e22c6f8ccc628f6a6a.zip
vim-patch:9.0.1538: :wqall does not trigger ExitPre (#23574)
Problem: :wqall does not trigger ExitPre. (Bart Libert) Solution: Move preparations for :qall to a common function. (closes vim/vim#12374) https://github.com/vim/vim/commit/411da64e77ef9d8edd1a5aa80fa5b9a4b159c93d Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old')
-rw-r--r--test/old/testdir/test_exit.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/old/testdir/test_exit.vim b/test/old/testdir/test_exit.vim
index 6dbfb7047c..93e55ce575 100644
--- a/test/old/testdir/test_exit.vim
+++ b/test/old/testdir/test_exit.vim
@@ -81,6 +81,18 @@ func Test_exiting()
\ readfile('Xtestout'))
endif
call delete('Xtestout')
+
+ " ExitPre autocommand also executed on :wqall
+ let after =<< trim [CODE]
+ au QuitPre * call writefile(["QuitPre"], "Xtestout", "a")
+ au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")
+ wqall
+ [CODE]
+
+ if RunVim([], after, '')
+ call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout'))
+ endif
+ call delete('Xtestout')
endfunc
" Test for getting the Vim exit code from v:exiting