1
0
forked from aniani/vim

patch 8.2.3042: swap file test fails

Problem:    Swap file test fails.
Solution:   Check for a very high process ID instead of one, which should be
            running.
This commit is contained in:
Bram Moolenaar
2021-06-23 21:44:06 +02:00
parent 44dea9da4b
commit 6738fd2000
2 changed files with 4 additions and 2 deletions

View File

@@ -201,8 +201,8 @@ func Test_swapfile_delete()
" This test won't work as root because root can successfully run kill(1, 0) " This test won't work as root because root can successfully run kill(1, 0)
if !IsRoot() if !IsRoot()
" Write the swapfile with a modified PID, now it will be automatically " Write the swapfile with a modified PID, now it will be automatically
" deleted. Process one should never be Vim. " deleted. Process 0x3fffffff most likely does not exist.
let swapfile_bytes[24:27] = 0z01000000 let swapfile_bytes[24:27] = 0zffffff3f
call writefile(swapfile_bytes, swapfile_name) call writefile(swapfile_bytes, swapfile_name)
let s:swapname = '' let s:swapname = ''
split XswapfileText split XswapfileText

View File

@@ -755,6 +755,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 */
/**/
3042,
/**/ /**/
3041, 3041,
/**/ /**/