Skip to content

Commit be9fc5b

Browse files
committed
patch 9.0.0428: autocmd test uses common file name
Problem: Autocmd test uses common file name. Solution: Use unique name to reduce flakiness.
1 parent 8995c4c commit be9fc5b

File tree

3 files changed

+27
-25
lines changed

3 files changed

+27
-25
lines changed

src/testdir/test_autocmd.vim

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -756,19 +756,19 @@ func Test_autocmd_bufwipe_in_SessLoadPost()
756756
augroup END
757757

758758
func WriteErrors()
759-
call writefile([execute("messages")], "Xerrors")
759+
call writefile([execute("messages")], "XerrorsBwipe")
760760
endfunc
761761
au VimLeave * call WriteErrors()
762762
[CODE]
763763

764764
call writefile(content, 'Xvimrc', 'D')
765765
call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq')
766766
sleep 100m
767-
let errors = join(readfile('Xerrors'))
767+
let errors = join(readfile('XerrorsBwipe'))
768768
call assert_match('E814:', errors)
769769

770770
set swapfile
771-
for file in ['Session.vim', 'Xerrors']
771+
for file in ['Session.vim', 'XerrorsBwipe']
772772
call delete(file)
773773
endfor
774774
endfunc
@@ -781,16 +781,16 @@ func Test_autocmd_blast_badd()
781781
edit foo1
782782
au BufNew,BufAdd,BufWinEnter,BufEnter,BufLeave,BufWinLeave,BufUnload,VimEnter foo* ball
783783
edit foo2
784-
call writefile(['OK'], 'Xerrors')
784+
call writefile(['OK'], 'XerrorsBlast')
785785
qall
786786
[CODE]
787787

788788
call writefile(content, 'XblastBall', 'D')
789789
call system(GetVimCommand() .. ' --clean -S XblastBall')
790790
sleep 100m
791-
call assert_match('OK', readfile('Xerrors')->join())
791+
call assert_match('OK', readfile('XerrorsBlast')->join())
792792

793-
call delete('Xerrors')
793+
call delete('XerrorsBlast')
794794
endfunc
795795

796796
" SEGV occurs in older versions.
@@ -817,21 +817,21 @@ func Test_autocmd_bufwipe_in_SessLoadPost2()
817817
au SessionLoadPost * call DeleteInactiveBufs()
818818

819819
func WriteErrors()
820-
call writefile([execute("messages")], "Xerrors")
820+
call writefile([execute("messages")], "XerrorsPost")
821821
endfunc
822822
au VimLeave * call WriteErrors()
823823
[CODE]
824824

825825
call writefile(content, 'Xvimrc', 'D')
826826
call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq')
827827
sleep 100m
828-
let errors = join(readfile('Xerrors'))
828+
let errors = join(readfile('XerrorsPost'))
829829
" This probably only ever matches on unix.
830830
call assert_notmatch('Caught deadly signal SEGV', errors)
831831
call assert_match('SessionLoadPost DONE', errors)
832832

833833
set swapfile
834-
for file in ['Session.vim', 'Xerrors']
834+
for file in ['Session.vim', 'XerrorsPost']
835835
call delete(file)
836836
endfor
837837
endfunc

src/testdir/test_startup.vim

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -306,40 +306,40 @@ func Test_q_arg()
306306
call writefile(lines, 'Xbadfile.c')
307307

308308
let after =<< trim [CODE]
309-
call writefile([&errorfile, string(getpos("."))], "Xtestout")
309+
call writefile([&errorfile, string(getpos("."))], "XtestoutQarg")
310310
copen
311-
w >> Xtestout
311+
w >> XtestoutQarg
312312
qall
313313
[CODE]
314314

315315
" Test with default argument '-q'.
316316
call assert_equal('errors.err', &errorfile)
317317
call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'errors.err')
318318
if RunVim([], after, '-q')
319-
let lines = readfile('Xtestout')
319+
let lines = readfile('XtestoutQarg')
320320
call assert_equal(['errors.err',
321321
\ '[0, 4, 12, 0]',
322322
\ "Xbadfile.c|4 col 12| error: expected ';' before '}' token"],
323323
\ lines)
324324
endif
325-
call delete('Xtestout')
325+
call delete('XtestoutQarg')
326326
call delete('errors.err')
327327

328-
" Test with explicit argument '-q Xerrors' (with space).
329-
call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'Xerrors')
330-
if RunVim([], after, '-q Xerrors')
331-
let lines = readfile('Xtestout')
332-
call assert_equal(['Xerrors',
328+
" Test with explicit argument '-q XerrorsQarg' (with space).
329+
call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'XerrorsQarg')
330+
if RunVim([], after, '-q XerrorsQarg')
331+
let lines = readfile('XtestoutQarg')
332+
call assert_equal(['XerrorsQarg',
333333
\ '[0, 4, 12, 0]',
334334
\ "Xbadfile.c|4 col 12| error: expected ';' before '}' token"],
335335
\ lines)
336336
endif
337-
call delete('Xtestout')
337+
call delete('XtestoutQarg')
338338

339-
" Test with explicit argument '-qXerrors' (without space).
340-
if RunVim([], after, '-qXerrors')
341-
let lines = readfile('Xtestout')
342-
call assert_equal(['Xerrors',
339+
" Test with explicit argument '-qXerrorsQarg' (without space).
340+
if RunVim([], after, '-qXerrorsQarg')
341+
let lines = readfile('XtestoutQarg')
342+
call assert_equal(['XerrorsQarg',
343343
\ '[0, 4, 12, 0]',
344344
\ "Xbadfile.c|4 col 12| error: expected ';' before '}' token"],
345345
\ lines)
@@ -350,8 +350,8 @@ func Test_q_arg()
350350
call assert_equal(3, v:shell_error)
351351

352352
call delete('Xbadfile.c')
353-
call delete('Xtestout')
354-
call delete('Xerrors')
353+
call delete('XtestoutQarg')
354+
call delete('XerrorsQarg')
355355
endfunc
356356

357357
" Test the -V[N]{filename} argument to set the 'verbose' option to N

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,8 @@ static char *(features[]) =
703703

704704
static int included_patches[] =
705705
{ /* Add new patch number below this line */
706+
/**/
707+
428,
706708
/**/
707709
427,
708710
/**/

0 commit comments

Comments
 (0)