]> granicus.if.org Git - vim/commitdiff
patch 8.2.5121: interrupt test sometimes fails v8.2.5121
authorBram Moolenaar <Bram@vim.org>
Sat, 18 Jun 2022 10:54:47 +0000 (11:54 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 18 Jun 2022 10:54:47 +0000 (11:54 +0100)
Problem:    Interrupt test sometimes fails.
Solution:   Use a different file name.

src/testdir/test_interrupt.vim
src/version.c

index 21ff0978843dfe14c8304370f2080afc2d16bd80..aa7f634302e758f2c64af6f1d69d5cd2252f1dc5 100644 (file)
@@ -13,17 +13,20 @@ func s:bufwritepost()
 endfunction
 
 func Test_interrupt()
-  new Xfile
+  new Xinterrupt
   let n = 0
   try
-    au BufWritePre Xfile call s:bufwritepre()
-    au BufWritePost Xfile call s:bufwritepost()
+    au BufWritePre Xinterrupt call s:bufwritepre()
+    au BufWritePost Xinterrupt call s:bufwritepost()
     w!
   catch /^Vim:Interrupt$/
   endtry
   call assert_equal(1, s:bufwritepre_called)
   call assert_equal(0, s:bufwritepost_called)
-  call assert_equal(0, filereadable('Xfile'))
+  call assert_equal(0, filereadable('Xinterrupt'))
+
+  au! BufWritePre
+  au! BufWritePost
 endfunc
 
 " vim: shiftwidth=2 sts=2 expandtab
index df9d576ad44f54ac8ed200353a2202494ca4842e..89e1fa1b7aff848f5e21fcb39aad12ee4cfd9016 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    5121,
 /**/
     5120,
 /**/