diff src/testdir/test_diffmode.vim @ 29997:98f5a0618a77 v9.0.0336

patch 9.0.0336: tests are flaky because of using a common file name Commit: https://github.com/vim/vim/commit/61abe7d8f827ec31f098e8abcdf58846b956ef16 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 30 21:46:08 2022 +0100 patch 9.0.0336: tests are flaky because of using a common file name Problem: Tests are flaky because of using a common file name. Solution: Rename files and directories to be more unique.
author Bram Moolenaar <Bram@vim.org>
date Tue, 30 Aug 2022 23:00:05 +0200
parents 2e2f57f2875d
children 25e3121ed316
line wrap: on
line diff
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -822,8 +822,8 @@ func Test_diff_lastline()
 endfunc
 
 func WriteDiffFiles(buf, list1, list2)
-  call writefile(a:list1, 'Xfile1')
-  call writefile(a:list2, 'Xfile2')
+  call writefile(a:list1, 'Xdifile1')
+  call writefile(a:list2, 'Xdifile2')
   if a:buf
     call term_sendkeys(a:buf, ":checktime\<CR>")
   endif
@@ -877,12 +877,12 @@ func Test_diff_screen()
   call writefile(lines, 'XdiffSetup')
 
   " clean up already existing swap files, just in case
-  call delete('.Xfile1.swp')
-  call delete('.Xfile2.swp')
+  call delete('.Xdifile1.swp')
+  call delete('.Xdifile2.swp')
 
   " Test 1: Add a line in beginning of file 2
   call WriteDiffFiles(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
-  let buf = RunVimInTerminal('-d -S XdiffSetup Xfile1 Xfile2', {})
+  let buf = RunVimInTerminal('-d -S XdiffSetup Xdifile1 Xdifile2', {})
   " Set autoread mode, so that Vim won't complain once we re-write the test
   " files
   call term_sendkeys(buf, ":set autoread\<CR>\<c-w>w:set autoread\<CR>\<c-w>w")
@@ -1000,8 +1000,8 @@ func Test_diff_screen()
 
   " clean up
   call StopVimInTerminal(buf)
-  call delete('Xfile1')
-  call delete('Xfile2')
+  call delete('Xdifile1')
+  call delete('Xdifile2')
   call delete('XdiffSetup')
 endfunc
 
@@ -1494,9 +1494,9 @@ endfunc
 " for the issue fixed by patch 6.2.317)
 func Test_diff_foldinvert()
   %bw!
-  edit Xfile1
-  new Xfile2
-  new Xfile3
+  edit Xdoffile1
+  new Xdoffile2
+  new Xdoffile3
   windo diffthis
   " open a non-diff window
   botright new