diff src/testdir/test_startup.vim @ 30184:dc238f2c7355 v9.0.0428

patch 9.0.0428: autocmd test uses common file name Commit: https://github.com/vim/vim/commit/be9fc5b60cbdf697c4f6d12345dd7fcdb5d6ca01 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 9 17:09:35 2022 +0100 patch 9.0.0428: autocmd test uses common file name Problem: Autocmd test uses common file name. Solution: Use unique name to reduce flakiness.
author Bram Moolenaar <Bram@vim.org>
date Fri, 09 Sep 2022 18:15:02 +0200
parents d891115c0aea
children 072c61082148
line wrap: on
line diff
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -306,9 +306,9 @@ func Test_q_arg()
   call writefile(lines, 'Xbadfile.c')
 
   let after =<< trim [CODE]
-    call writefile([&errorfile, string(getpos("."))], "Xtestout")
+    call writefile([&errorfile, string(getpos("."))], "XtestoutQarg")
     copen
-    w >> Xtestout
+    w >> XtestoutQarg
     qall
   [CODE]
 
@@ -316,30 +316,30 @@ func Test_q_arg()
   call assert_equal('errors.err', &errorfile)
   call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'errors.err')
   if RunVim([], after, '-q')
-    let lines = readfile('Xtestout')
+    let lines = readfile('XtestoutQarg')
     call assert_equal(['errors.err',
 	\              '[0, 4, 12, 0]',
 	\              "Xbadfile.c|4 col 12| error: expected ';' before '}' token"],
 	\             lines)
   endif
-  call delete('Xtestout')
+  call delete('XtestoutQarg')
   call delete('errors.err')
 
-  " Test with explicit argument '-q Xerrors' (with space).
-  call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'Xerrors')
-  if RunVim([], after, '-q Xerrors')
-    let lines = readfile('Xtestout')
-    call assert_equal(['Xerrors',
+  " Test with explicit argument '-q XerrorsQarg' (with space).
+  call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'XerrorsQarg')
+  if RunVim([], after, '-q XerrorsQarg')
+    let lines = readfile('XtestoutQarg')
+    call assert_equal(['XerrorsQarg',
 	\              '[0, 4, 12, 0]',
 	\              "Xbadfile.c|4 col 12| error: expected ';' before '}' token"],
 	\             lines)
   endif
-  call delete('Xtestout')
+  call delete('XtestoutQarg')
 
-  " Test with explicit argument '-qXerrors' (without space).
-  if RunVim([], after, '-qXerrors')
-    let lines = readfile('Xtestout')
-    call assert_equal(['Xerrors',
+  " Test with explicit argument '-qXerrorsQarg' (without space).
+  if RunVim([], after, '-qXerrorsQarg')
+    let lines = readfile('XtestoutQarg')
+    call assert_equal(['XerrorsQarg',
 	\              '[0, 4, 12, 0]',
 	\              "Xbadfile.c|4 col 12| error: expected ';' before '}' token"],
 	\             lines)
@@ -350,8 +350,8 @@ func Test_q_arg()
   call assert_equal(3, v:shell_error)
 
   call delete('Xbadfile.c')
-  call delete('Xtestout')
-  call delete('Xerrors')
+  call delete('XtestoutQarg')
+  call delete('XerrorsQarg')
 endfunc
 
 " Test the -V[N]{filename} argument to set the 'verbose' option to N