diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-02-25 00:20:35 +0000 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2022-03-14 13:10:56 +0000 |
commit | 0412dba45622eeb20e83d5458bab8714e2da0d2e (patch) | |
tree | 693df405a0b102d45bd27f5dc5603b993dca7b7e /src | |
parent | fe5318293442aabdd4c7fd12ad892adcba1f80fb (diff) | |
download | rneovim-0412dba45622eeb20e83d5458bab8714e2da0d2e.tar.gz rneovim-0412dba45622eeb20e83d5458bab8714e2da0d2e.tar.bz2 rneovim-0412dba45622eeb20e83d5458bab8714e2da0d2e.zip |
vim-patch:8.2.4444: beep caused by test
Problem: Beep caused by test. ASAN reports leaks.
Solution: Do not put a NL at the end of the script. Make the text work on
MS-Windows. Do not run the test with ASAN.
https://github.com/vim/vim/commit/68eab67119734ea1efc7cef1287276d969f2713a
The test is skipped, but cherry-pick CheckNotAsan from v8.2.2424 anyway.
https://github.com/vim/vim/commit/97202d951685fc4d90085da676a90644cbf72571
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/check.vim | 8 | ||||
-rw-r--r-- | src/nvim/testdir/test_exit.vim | 9 |
2 files changed, 13 insertions, 4 deletions
diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim index 883f036fe1..8f97d959ce 100644 --- a/src/nvim/testdir/check.vim +++ b/src/nvim/testdir/check.vim @@ -137,6 +137,14 @@ func CheckNotMSWindows() endif endfunc +" Command to check for not running under ASAN +command CheckNotAsan call CheckNotAsan() +func CheckNotAsan() + if execute('version') =~# '-fsanitize=[a-z,]*\<address\>' + throw 'Skipped: does not work with ASAN' + endif +endfunc + " Command to check for satisfying any of the conditions. " e.g. CheckAnyOf Feature:bsd Feature:sun Linux command -nargs=+ CheckAnyOf call CheckAnyOf(<f-args>) diff --git a/src/nvim/testdir/test_exit.vim b/src/nvim/testdir/test_exit.vim index cbbd82d7d3..412802efb2 100644 --- a/src/nvim/testdir/test_exit.vim +++ b/src/nvim/testdir/test_exit.vim @@ -114,13 +114,14 @@ 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\<CR>q:"], 'Xscript') + 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') + " if RunVim([], [], '<Xscript') + if RunVim([], [], '-s - <Xscript') call assert_equal(['l = 1'], readfile('Xtestout')) endif call delete('Xscript') |