diff options
| author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-03-14 13:55:12 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-14 13:55:12 +0000 |
| commit | 2fbbd3258ec90d37c3192a1f7a8ee2cd4db5653e (patch) | |
| tree | 7da2a639663d6c46e57766b5e9cb70a6ccd63c39 /src/nvim/testdir/test_exit.vim | |
| parent | 895ca52e4c726fd6c2cf6fbbab0d392818337ce7 (diff) | |
| parent | 365a9b074f2df3c573ae4a520084818bdd46cd3d (diff) | |
| download | rneovim-2fbbd3258ec90d37c3192a1f7a8ee2cd4db5653e.tar.gz rneovim-2fbbd3258ec90d37c3192a1f7a8ee2cd4db5653e.tar.bz2 rneovim-2fbbd3258ec90d37c3192a1f7a8ee2cd4db5653e.zip | |
Merge pull request #17488 from seandewar/vim-8.2.4428
vim-patch:8.2.{1401,1413,4428,4432,4434,4438,4442,4444,4445,4454}: tabpage patches
Diffstat (limited to 'src/nvim/testdir/test_exit.vim')
| -rw-r--r-- | src/nvim/testdir/test_exit.vim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_exit.vim b/src/nvim/testdir/test_exit.vim index bd3e9eb4d4..befcaec2b2 100644 --- a/src/nvim/testdir/test_exit.vim +++ b/src/nvim/testdir/test_exit.vim @@ -1,6 +1,7 @@ " Tests for exiting Vim. source shared.vim +source check.vim func Test_exiting() let after =<< trim [CODE] @@ -109,4 +110,25 @@ func Test_exit_code() call delete('Xtestout') endfunc +func Test_exit_error_reading_input() + throw 'Skipped: Nvim does not exit after stdin is read' + + CheckNotGui + CheckNotMSWindows + " The early exit causes memory not to be freed somehow + CheckNotAsan + + call writefile([":au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout')", ":tabnew", "q:"], 'Xscript', 'b') + + " Nvim requires "-s -" to read stdin as Normal mode input + " if RunVim([], [], '<Xscript') + if RunVim([], [], '-s - <Xscript') + call assert_equal(1, v:shell_error) + call assert_equal(['l = 1'], readfile('Xtestout')) + endif + call delete('Xscript') + call delete('Xtestout') +endfun + + " vim: shiftwidth=2 sts=2 expandtab |