diff src/testdir/test_fileformat.vim @ 30051:13b02c1ea0f7 v9.0.0363

patch 9.0.0363: common names in test files causes tests to be flaky Commit: https://github.com/vim/vim/commit/b18b49699776485150b71626069a40d12d2c5590 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 2 21:55:50 2022 +0100 patch 9.0.0363: common names in test files causes tests to be flaky Problem: Common names in test files causes tests to be flaky. Solution: Use more specific names.
author Bram Moolenaar <Bram@vim.org>
date Fri, 02 Sep 2022 23:00:04 +0200
parents dc3d45d9a4a8
children a7a9e8b9af89
line wrap: on
line diff
--- a/src/testdir/test_fileformat.vim
+++ b/src/testdir/test_fileformat.vim
@@ -22,16 +22,16 @@ endfunc
 func Test_fileformat_autocommand()
   let filecnt = ["", "foobar\<CR>", "eins\<CR>", "\<CR>", "zwei\<CR>", "drei", "vier", "fünf", ""]
   let ffs = &ffs
-  call writefile(filecnt, 'Xfile', 'b')
-  au BufReadPre Xfile set ffs=dos ff=dos
-  new Xfile
+  call writefile(filecnt, 'Xffafile', 'b')
+  au BufReadPre Xffafile set ffs=dos ff=dos
+  new Xffafile
   call assert_equal('dos', &l:ff)
   call assert_equal('dos', &ffs)
 
   " cleanup
-  call delete('Xfile')
+  call delete('Xffafile')
   let &ffs = ffs
-  au! BufReadPre Xfile
+  au! BufReadPre Xffafile
   bw!
 endfunc
 
@@ -314,14 +314,14 @@ endfunc
 " used as the 'fileformat'.
 func Test_fileformat_on_startup()
   let after =<< trim END
-    call writefile([&fileformat], 'Xfile', 'a')
+    call writefile([&fileformat], 'Xonsfile', 'a')
     quit
   END
   call RunVim(["set ffs=dos,unix,mac"], after, '')
   call RunVim(["set ffs=mac,dos,unix"], after, '')
   call RunVim(["set ffs=unix,mac,dos"], after, '')
-  call assert_equal(['dos', 'mac', 'unix'], readfile('Xfile'))
-  call delete('Xfile')
+  call assert_equal(['dos', 'mac', 'unix'], readfile('Xonsfile'))
+  call delete('Xonsfile')
 endfunc
 
 " vim: shiftwidth=2 sts=2 expandtab