forked from aniani/vim
patch 9.0.0428: autocmd test uses common file name
Problem: Autocmd test uses common file name. Solution: Use unique name to reduce flakiness.
This commit is contained in:
@@ -756,7 +756,7 @@ func Test_autocmd_bufwipe_in_SessLoadPost()
|
|||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
func WriteErrors()
|
func WriteErrors()
|
||||||
call writefile([execute("messages")], "Xerrors")
|
call writefile([execute("messages")], "XerrorsBwipe")
|
||||||
endfunc
|
endfunc
|
||||||
au VimLeave * call WriteErrors()
|
au VimLeave * call WriteErrors()
|
||||||
[CODE]
|
[CODE]
|
||||||
@@ -764,11 +764,11 @@ func Test_autocmd_bufwipe_in_SessLoadPost()
|
|||||||
call writefile(content, 'Xvimrc', 'D')
|
call writefile(content, 'Xvimrc', 'D')
|
||||||
call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq')
|
call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq')
|
||||||
sleep 100m
|
sleep 100m
|
||||||
let errors = join(readfile('Xerrors'))
|
let errors = join(readfile('XerrorsBwipe'))
|
||||||
call assert_match('E814:', errors)
|
call assert_match('E814:', errors)
|
||||||
|
|
||||||
set swapfile
|
set swapfile
|
||||||
for file in ['Session.vim', 'Xerrors']
|
for file in ['Session.vim', 'XerrorsBwipe']
|
||||||
call delete(file)
|
call delete(file)
|
||||||
endfor
|
endfor
|
||||||
endfunc
|
endfunc
|
||||||
@@ -781,16 +781,16 @@ func Test_autocmd_blast_badd()
|
|||||||
edit foo1
|
edit foo1
|
||||||
au BufNew,BufAdd,BufWinEnter,BufEnter,BufLeave,BufWinLeave,BufUnload,VimEnter foo* ball
|
au BufNew,BufAdd,BufWinEnter,BufEnter,BufLeave,BufWinLeave,BufUnload,VimEnter foo* ball
|
||||||
edit foo2
|
edit foo2
|
||||||
call writefile(['OK'], 'Xerrors')
|
call writefile(['OK'], 'XerrorsBlast')
|
||||||
qall
|
qall
|
||||||
[CODE]
|
[CODE]
|
||||||
|
|
||||||
call writefile(content, 'XblastBall', 'D')
|
call writefile(content, 'XblastBall', 'D')
|
||||||
call system(GetVimCommand() .. ' --clean -S XblastBall')
|
call system(GetVimCommand() .. ' --clean -S XblastBall')
|
||||||
sleep 100m
|
sleep 100m
|
||||||
call assert_match('OK', readfile('Xerrors')->join())
|
call assert_match('OK', readfile('XerrorsBlast')->join())
|
||||||
|
|
||||||
call delete('Xerrors')
|
call delete('XerrorsBlast')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" SEGV occurs in older versions.
|
" SEGV occurs in older versions.
|
||||||
@@ -817,7 +817,7 @@ func Test_autocmd_bufwipe_in_SessLoadPost2()
|
|||||||
au SessionLoadPost * call DeleteInactiveBufs()
|
au SessionLoadPost * call DeleteInactiveBufs()
|
||||||
|
|
||||||
func WriteErrors()
|
func WriteErrors()
|
||||||
call writefile([execute("messages")], "Xerrors")
|
call writefile([execute("messages")], "XerrorsPost")
|
||||||
endfunc
|
endfunc
|
||||||
au VimLeave * call WriteErrors()
|
au VimLeave * call WriteErrors()
|
||||||
[CODE]
|
[CODE]
|
||||||
@@ -825,13 +825,13 @@ func Test_autocmd_bufwipe_in_SessLoadPost2()
|
|||||||
call writefile(content, 'Xvimrc', 'D')
|
call writefile(content, 'Xvimrc', 'D')
|
||||||
call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq')
|
call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq')
|
||||||
sleep 100m
|
sleep 100m
|
||||||
let errors = join(readfile('Xerrors'))
|
let errors = join(readfile('XerrorsPost'))
|
||||||
" This probably only ever matches on unix.
|
" This probably only ever matches on unix.
|
||||||
call assert_notmatch('Caught deadly signal SEGV', errors)
|
call assert_notmatch('Caught deadly signal SEGV', errors)
|
||||||
call assert_match('SessionLoadPost DONE', errors)
|
call assert_match('SessionLoadPost DONE', errors)
|
||||||
|
|
||||||
set swapfile
|
set swapfile
|
||||||
for file in ['Session.vim', 'Xerrors']
|
for file in ['Session.vim', 'XerrorsPost']
|
||||||
call delete(file)
|
call delete(file)
|
||||||
endfor
|
endfor
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -306,9 +306,9 @@ func Test_q_arg()
|
|||||||
call writefile(lines, 'Xbadfile.c')
|
call writefile(lines, 'Xbadfile.c')
|
||||||
|
|
||||||
let after =<< trim [CODE]
|
let after =<< trim [CODE]
|
||||||
call writefile([&errorfile, string(getpos("."))], "Xtestout")
|
call writefile([&errorfile, string(getpos("."))], "XtestoutQarg")
|
||||||
copen
|
copen
|
||||||
w >> Xtestout
|
w >> XtestoutQarg
|
||||||
qall
|
qall
|
||||||
[CODE]
|
[CODE]
|
||||||
|
|
||||||
@@ -316,30 +316,30 @@ func Test_q_arg()
|
|||||||
call assert_equal('errors.err', &errorfile)
|
call assert_equal('errors.err', &errorfile)
|
||||||
call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'errors.err')
|
call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'errors.err')
|
||||||
if RunVim([], after, '-q')
|
if RunVim([], after, '-q')
|
||||||
let lines = readfile('Xtestout')
|
let lines = readfile('XtestoutQarg')
|
||||||
call assert_equal(['errors.err',
|
call assert_equal(['errors.err',
|
||||||
\ '[0, 4, 12, 0]',
|
\ '[0, 4, 12, 0]',
|
||||||
\ "Xbadfile.c|4 col 12| error: expected ';' before '}' token"],
|
\ "Xbadfile.c|4 col 12| error: expected ';' before '}' token"],
|
||||||
\ lines)
|
\ lines)
|
||||||
endif
|
endif
|
||||||
call delete('Xtestout')
|
call delete('XtestoutQarg')
|
||||||
call delete('errors.err')
|
call delete('errors.err')
|
||||||
|
|
||||||
" Test with explicit argument '-q Xerrors' (with space).
|
" Test with explicit argument '-q XerrorsQarg' (with space).
|
||||||
call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'Xerrors')
|
call writefile(["Xbadfile.c:4:12: error: expected ';' before '}' token"], 'XerrorsQarg')
|
||||||
if RunVim([], after, '-q Xerrors')
|
if RunVim([], after, '-q XerrorsQarg')
|
||||||
let lines = readfile('Xtestout')
|
let lines = readfile('XtestoutQarg')
|
||||||
call assert_equal(['Xerrors',
|
call assert_equal(['XerrorsQarg',
|
||||||
\ '[0, 4, 12, 0]',
|
\ '[0, 4, 12, 0]',
|
||||||
\ "Xbadfile.c|4 col 12| error: expected ';' before '}' token"],
|
\ "Xbadfile.c|4 col 12| error: expected ';' before '}' token"],
|
||||||
\ lines)
|
\ lines)
|
||||||
endif
|
endif
|
||||||
call delete('Xtestout')
|
call delete('XtestoutQarg')
|
||||||
|
|
||||||
" Test with explicit argument '-qXerrors' (without space).
|
" Test with explicit argument '-qXerrorsQarg' (without space).
|
||||||
if RunVim([], after, '-qXerrors')
|
if RunVim([], after, '-qXerrorsQarg')
|
||||||
let lines = readfile('Xtestout')
|
let lines = readfile('XtestoutQarg')
|
||||||
call assert_equal(['Xerrors',
|
call assert_equal(['XerrorsQarg',
|
||||||
\ '[0, 4, 12, 0]',
|
\ '[0, 4, 12, 0]',
|
||||||
\ "Xbadfile.c|4 col 12| error: expected ';' before '}' token"],
|
\ "Xbadfile.c|4 col 12| error: expected ';' before '}' token"],
|
||||||
\ lines)
|
\ lines)
|
||||||
@@ -350,8 +350,8 @@ func Test_q_arg()
|
|||||||
call assert_equal(3, v:shell_error)
|
call assert_equal(3, v:shell_error)
|
||||||
|
|
||||||
call delete('Xbadfile.c')
|
call delete('Xbadfile.c')
|
||||||
call delete('Xtestout')
|
call delete('XtestoutQarg')
|
||||||
call delete('Xerrors')
|
call delete('XerrorsQarg')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test the -V[N]{filename} argument to set the 'verbose' option to N
|
" Test the -V[N]{filename} argument to set the 'verbose' option to N
|
||||||
|
@@ -703,6 +703,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
428,
|
||||||
/**/
|
/**/
|
||||||
427,
|
427,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user