1
0
forked from aniani/vim

patch 8.2.5143: some tests fail when using valgrind

Problem:    Some tests fail when using valgrind. Spurious leak reports.
Solution:   Use WaitForAssert().  Avoid failing fork/exec.  Skip tests where a
            job is killed when running valgrind.
This commit is contained in:
Bram Moolenaar
2022-06-21 17:40:47 +01:00
parent fa04eae5a5
commit 37bb3b111d
5 changed files with 45 additions and 33 deletions

View File

@@ -244,10 +244,13 @@ func Test_cscopeWithCscopeConnections()
call assert_equal('', a)
" Test: 'csprg' option
call assert_equal('cscope', &csprg)
set csprg=doesnotexist
call assert_fails('cscope add Xcscope2.out', 'E262:')
set csprg=cscope
" Skip this with valgrind, it causes spurious leak reports
if !RunningWithValgrind()
call assert_equal('cscope', &csprg)
set csprg=doesnotexist
call assert_fails('cscope add Xcscope2.out', 'E262:')
set csprg=cscope
endif
" Test: multiple cscope connections
cscope add Xcscope.out