test/legacy: fix test_autocmd.vim

vim-patch:8.0.0487
This commit is contained in:
Justin M. Keyes 2017-03-21 10:47:46 +01:00
parent 2e9c1a9c4a
commit b0e34497b3
2 changed files with 9 additions and 5 deletions

View File

@ -72,6 +72,8 @@ let v:testing = 1
set directory^=.
set backspace=
set nohidden smarttab noautoindent noautoread complete-=i noruler noshowcmd
" Prevent Nvim log from writing to stderr.
let $NVIM_LOG_FILE='Xnvim.log'
function RunTheTest(test)
echo 'Executing ' . a:test

View File

@ -359,11 +359,11 @@ function Test_autocmd_bufwipe_in_SessLoadPost()
\ 'let v:swapchoice="e"',
\ 'augroup test_autocmd_sessionload',
\ 'autocmd!',
\ 'autocmd SessionLoadPost * 4bw!',
\ 'augroup END'
\ 'autocmd SessionLoadPost * 4bw!|qall!',
\ 'augroup END',
\ ]
call writefile(content, 'Xvimrc')
let a=system(v:progpath. ' --headless -u Xvimrc --noplugins -S Session.vim')
let a=system(v:progpath. ' --headless -i NONE -u Xvimrc --noplugins -S Session.vim')
call assert_match('E814', a)
unlet! g:bufnr
@ -395,11 +395,13 @@ function Test_autocmd_bufwipe_in_SessLoadPost2()
\ ' exec ''bwipeout '' . b',
\ ' endif',
\ ' endfor',
\ 'call append("1", "SessionLoadPost DONE")',
\ 'redraw!',
\ 'echon "SessionLoadPost DONE"',
\ 'qall!',
\ 'endfunction',
\ 'au SessionLoadPost * call DeleteInactiveBufs()']
call writefile(content, 'Xvimrc')
let a=system(v:progpath. ' --headless -u Xvimrc --noplugins -S Session.vim')
let a=system(v:progpath. ' --headless -i NONE -u Xvimrc --noplugins -S Session.vim')
" this probably only matches on unix
if has("unix")
call assert_notmatch('Caught deadly signal SEGV', a)