Patch 9.0.0393
Problem: Signals test often fails on FreeBSD.
Solution: Use separate files for Suspend and Resume. (Ken Takata,
closes #11065)
Files: src/testdir/test_signals.vim
*** ../vim-9.0.0392/src/testdir/test_signals.vim 2022-06-25
12:10:03.000000000 +0100
--- src/testdir/test_signals.vim 2022-09-06 10:51:25.110167057 +0100
***************
*** 111,120 ****
" the test would then fail again if they are not deleted first.
call delete('.Xsig_TERM.swp')
call delete('XsetupAucmd')
! call delete('XautoOut')
let lines =<< trim END
! au VimSuspend * call writefile(["VimSuspend triggered"], "XautoOut", "as")
! au VimResume * call writefile(["VimResume triggered"], "XautoOut", "as")
END
call writefile(lines, 'XsetupAucmd')
--- 111,121 ----
" the test would then fail again if they are not deleted first.
call delete('.Xsig_TERM.swp')
call delete('XsetupAucmd')
! call delete('XautoOut1')
! call delete('XautoOut2')
let lines =<< trim END
! au VimSuspend * call writefile(["VimSuspend triggered"], "XautoOut1",
"as")
! au VimResume * call writefile(["VimResume triggered"], "XautoOut2", "as")
END
call writefile(lines, 'XsetupAucmd')
***************
*** 129,149 ****
" After TSTP the file is not saved (same function as ^Z)
exe 'silent !kill -s TSTP ' .. pid_vim
call WaitForAssert({-> assert_true(filereadable('.Xsig_TERM.swp'))})
" We resume after the suspend. Sleep a bit for the signal to take effect,
" also when running under valgrind.
exe 'silent !kill -s CONT ' .. pid_vim
! sleep 100m
call StopVimInTerminal(buf)
! let result = readfile('XautoOut')
! call assert_equal(["VimSuspend triggered", "VimResume triggered"], result)
%bwipe!
call delete('.Xsig_TERM.swp')
call delete('XsetupAucmd')
! call delete('XautoOut')
endfunc
" Test a deadly signal.
--- 130,155 ----
" After TSTP the file is not saved (same function as ^Z)
exe 'silent !kill -s TSTP ' .. pid_vim
call WaitForAssert({-> assert_true(filereadable('.Xsig_TERM.swp'))})
+ sleep 100m
" We resume after the suspend. Sleep a bit for the signal to take effect,
" also when running under valgrind.
exe 'silent !kill -s CONT ' .. pid_vim
! call WaitForAssert({-> assert_true(filereadable('XautoOut2'))})
! sleep 10m
call StopVimInTerminal(buf)
! let result = readfile('XautoOut1')
! call assert_equal(["VimSuspend triggered"], result)
! let result = readfile('XautoOut2')
! call assert_equal(["VimResume triggered"], result)
%bwipe!
call delete('.Xsig_TERM.swp')
call delete('XsetupAucmd')
! call delete('XautoOut1')
! call delete('XautoOut2')
endfunc
" Test a deadly signal.
*** ../vim-9.0.0392/src/version.c 2022-09-05 21:45:08.317861536 +0100
--- src/version.c 2022-09-06 10:56:02.337989596 +0100
***************
*** 705,706 ****
--- 705,708 ----
{ /* Add new patch number below this line */
+ /**/
+ 393,
/**/
--
hundred-and-one symptoms of being an internet addict:
12. You turn off your Wifi and get this awful empty feeling, like you just
pulled the plug on a loved one.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220906095933.88FD51C0D3E%40moolenaar.net.