]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.0874: signals test is a bit flaky v8.2.0874
authorBram Moolenaar <Bram@vim.org>
Mon, 1 Jun 2020 13:05:19 +0000 (15:05 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 1 Jun 2020 13:05:19 +0000 (15:05 +0200)
Problem:    Signals test is a bit flaky.
Solution:   Flush the XautoOut file.  Delete files that may be left behind
            from a failure. (Dominique Pelle, closes #6179)

src/testdir/test_signals.vim
src/version.c

index 135037adc9c61030d41228434694db6c033b1f15..78b2cecb8580264b15a240aae93387ff630013b9 100644 (file)
@@ -123,9 +123,15 @@ func Test_deadly_signal_TERM()
   if cmd =~ 'valgrind'
     throw 'Skipped: cannot test signal TERM with valgrind'
   endif
+
+  " If test fails once, it can leave temporary files and trying to rerun
+  " 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 VimLeave * call writefile(["VimLeave triggered"], "XautoOut", "a")
-    au VimLeavePre * call writefile(["VimLeavePre triggered"], "XautoOut", "a")
+    au VimLeave * call writefile(["VimLeave triggered"], "XautoOut", "as")
+    au VimLeavePre * call writefile(["VimLeavePre triggered"], "XautoOut", "as")
   END
   call writefile(lines, 'XsetupAucmd')
 
index df3640829bde8edc03f0c8895cc77fb93035ac4e..66102522a832a632f66f09b03faf1e0898be288b 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    874,
 /**/
     873,
 /**/