forked from aniani/vim
patch 9.0.0393: signals test often fails on FreeBSD
Problem: Signals test often fails on FreeBSD. Solution: Use separate files for Suspend and Resume. (Ken Takata, closes #11065)
This commit is contained in:
parent
e53a0d4409
commit
a9480dbc8c
@ -111,10 +111,11 @@ func Test_signal_TSTP()
|
|||||||
" the test would then fail again if they are not deleted first.
|
" the test would then fail again if they are not deleted first.
|
||||||
call delete('.Xsig_TERM.swp')
|
call delete('.Xsig_TERM.swp')
|
||||||
call delete('XsetupAucmd')
|
call delete('XsetupAucmd')
|
||||||
call delete('XautoOut')
|
call delete('XautoOut1')
|
||||||
|
call delete('XautoOut2')
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
au VimSuspend * call writefile(["VimSuspend triggered"], "XautoOut", "as")
|
au VimSuspend * call writefile(["VimSuspend triggered"], "XautoOut1", "as")
|
||||||
au VimResume * call writefile(["VimResume triggered"], "XautoOut", "as")
|
au VimResume * call writefile(["VimResume triggered"], "XautoOut2", "as")
|
||||||
END
|
END
|
||||||
call writefile(lines, 'XsetupAucmd')
|
call writefile(lines, 'XsetupAucmd')
|
||||||
|
|
||||||
@ -129,21 +130,26 @@ func Test_signal_TSTP()
|
|||||||
" After TSTP the file is not saved (same function as ^Z)
|
" After TSTP the file is not saved (same function as ^Z)
|
||||||
exe 'silent !kill -s TSTP ' .. pid_vim
|
exe 'silent !kill -s TSTP ' .. pid_vim
|
||||||
call WaitForAssert({-> assert_true(filereadable('.Xsig_TERM.swp'))})
|
call WaitForAssert({-> assert_true(filereadable('.Xsig_TERM.swp'))})
|
||||||
|
sleep 100m
|
||||||
|
|
||||||
" We resume after the suspend. Sleep a bit for the signal to take effect,
|
" We resume after the suspend. Sleep a bit for the signal to take effect,
|
||||||
" also when running under valgrind.
|
" also when running under valgrind.
|
||||||
exe 'silent !kill -s CONT ' .. pid_vim
|
exe 'silent !kill -s CONT ' .. pid_vim
|
||||||
sleep 100m
|
call WaitForAssert({-> assert_true(filereadable('XautoOut2'))})
|
||||||
|
sleep 10m
|
||||||
|
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
|
|
||||||
let result = readfile('XautoOut')
|
let result = readfile('XautoOut1')
|
||||||
call assert_equal(["VimSuspend triggered", "VimResume triggered"], result)
|
call assert_equal(["VimSuspend triggered"], result)
|
||||||
|
let result = readfile('XautoOut2')
|
||||||
|
call assert_equal(["VimResume triggered"], result)
|
||||||
|
|
||||||
%bwipe!
|
%bwipe!
|
||||||
call delete('.Xsig_TERM.swp')
|
call delete('.Xsig_TERM.swp')
|
||||||
call delete('XsetupAucmd')
|
call delete('XsetupAucmd')
|
||||||
call delete('XautoOut')
|
call delete('XautoOut1')
|
||||||
|
call delete('XautoOut2')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test a deadly signal.
|
" Test a deadly signal.
|
||||||
|
@ -703,6 +703,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
393,
|
||||||
/**/
|
/**/
|
||||||
392,
|
392,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user