]> granicus.if.org Git - vim/commitdiff
patch 8.2.3042: swap file test fails v8.2.3042
authorBram Moolenaar <Bram@vim.org>
Wed, 23 Jun 2021 19:44:06 +0000 (21:44 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 23 Jun 2021 19:44:06 +0000 (21:44 +0200)
Problem:    Swap file test fails.
Solution:   Check for a very high process ID instead of one, which should be
            running.

src/testdir/test_swap.vim
src/version.c

index 90afb4d6f038b0e8117cfb4814d4852187da1405..caacd7e175f32cabf0b81542e9725197a8b4c1bb 100644 (file)
@@ -201,8 +201,8 @@ func Test_swapfile_delete()
   " This test won't work as root because root can successfully run kill(1, 0)
   if !IsRoot()
     " Write the swapfile with a modified PID, now it will be automatically
-    " deleted. Process one should never be Vim.
-    let swapfile_bytes[24:27] = 0z01000000
+    " deleted. Process 0x3fffffff most likely does not exist.
+    let swapfile_bytes[24:27] = 0zffffff3f
     call writefile(swapfile_bytes, swapfile_name)
     let s:swapname = ''
     split XswapfileText
index 79f05ccf78e3a3a7df6dfdd7cbe1a3dea73d9735..1ec8342d6019141862d99cfc1d63b5ade7c7ec1a 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3042,
 /**/
     3041,
 /**/