aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-03-21 10:47:46 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-03-22 18:42:58 +0100
commitb0e34497b357462024c07d506a16426d58475497 (patch)
tree55cdd18175ea309a776dae3150c31c8cf3987f53
parent2e9c1a9c4a6e2aaaef87c1c37b9cd14965b6d7b8 (diff)
downloadrneovim-b0e34497b357462024c07d506a16426d58475497.tar.gz
rneovim-b0e34497b357462024c07d506a16426d58475497.tar.bz2
rneovim-b0e34497b357462024c07d506a16426d58475497.zip
test/legacy: fix test_autocmd.vim
vim-patch:8.0.0487
-rw-r--r--src/nvim/testdir/runtest.vim2
-rw-r--r--src/nvim/testdir/test_autocmd.vim12
2 files changed, 9 insertions, 5 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim
index b4eb9de506..1cf7ab475c 100644
--- a/src/nvim/testdir/runtest.vim
+++ b/src/nvim/testdir/runtest.vim
@@ -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
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
index a122a62561..5b5232f06e 100644
--- a/src/nvim/testdir/test_autocmd.vim
+++ b/src/nvim/testdir/test_autocmd.vim
@@ -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)