diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-22 00:15:18 -0500 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-22 18:08:47 -0500 |
| commit | caf2620f18affec2846b56de4f6bf6453296537a (patch) | |
| tree | c05649e2e57bc2c66c3ef017d6d43a89c77d17d8 /src/nvim/testdir | |
| parent | 40f9b1dd2cd843a001d7df90647706704f240eb5 (diff) | |
| download | rneovim-caf2620f18affec2846b56de4f6bf6453296537a.tar.gz rneovim-caf2620f18affec2846b56de4f6bf6453296537a.tar.bz2 rneovim-caf2620f18affec2846b56de4f6bf6453296537a.zip | |
vim-patch:8.2.0769: VimLeavePre not triggered when Vim is terminated
Problem: VimLeavePre not triggered when Vim is terminated.
Solution: Unblock autocommands.
https://github.com/vim/vim/commit/129d6bf6b3d120b0a4c69e18b5e8602a84e352bf
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_signals.vim | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_signals.vim b/src/nvim/testdir/test_signals.vim index fdcb37a6d9..fab42cb7c6 100644 --- a/src/nvim/testdir/test_signals.vim +++ b/src/nvim/testdir/test_signals.vim @@ -98,8 +98,13 @@ func Test_deadly_signal_TERM() if cmd =~ 'valgrind' throw 'Skipped: cannot test signal TERM with valgrind' endif + let lines =<< trim END + au VimLeave * call writefile(["VimLeave triggered"], "XautoOut", "a") + au VimLeavePre * call writefile(["VimLeavePre triggered"], "XautoOut", "a") + END + call writefile(lines, 'XsetupAucmd') - let buf = RunVimInTerminal('Xsig_TERM', {'rows': 6}) + let buf = RunVimInTerminal('-S XsetupAucmd Xsig_TERM', {'rows': 6}) let pid_vim = term_getjob(buf)->job_info().process call term_sendkeys(buf, ":call setline(1, 'foo')\n") @@ -116,8 +121,14 @@ func Test_deadly_signal_TERM() silent recover .Xsig_TERM.swp call assert_equal(['foo'], getline(1, '$')) + let result = readfile('XautoOut') + call assert_match('VimLeavePre triggered', result[0]) + call assert_match('VimLeave triggered', result[1]) + %bwipe! call delete('.Xsig_TERM.swp') + call delete('XsetupAucmd') + call delete('XautoOut') endfunc " vim: ts=8 sw=2 sts=2 tw=80 fdm=marker |