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.
68eab67119

The test is skipped, but cherry-pick CheckNotAsan from v8.2.2424 anyway.
97202d9516
This commit is contained in:
Sean Dewar 2022-02-25 00:20:35 +00:00
parent fe53182934
commit 0412dba456
No known key found for this signature in database
GPG Key ID: 08CC2C83AD41B581
2 changed files with 13 additions and 4 deletions

View File

@ -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>)

View File

@ -114,9 +114,10 @@ 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')