Fix test cases

This commit is contained in:
Junegunn Choi 2021-02-08 16:14:34 +09:00
parent 52b68b4e62
commit 33e188c054
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -428,13 +428,17 @@ Execute (New commits on remote, PlugUpdate, then PlugDiff):
execute "normal Xy\<cr>" execute "normal Xy\<cr>"
AssertExpect '^- ', 1 AssertExpect '^- ', 1
" q will close preview window as well " q will only close preview window
normal q normal q
" We no longer have preview window " We no longer have preview window
silent! wincmd P silent! wincmd P
AssertEqual 0, &previewwindow AssertEqual 0, &previewwindow
" And we're still on main vim-plug window
AssertEqual 'vim-plug', &filetype
normal q
" q should not close preview window if it's already open " q should not close preview window if it's already open
pedit pedit
PlugDiff PlugDiff
@ -459,6 +463,11 @@ Execute (Test g:plug_pwindow):
AssertEqual 2, winnr() AssertEqual 2, winnr()
AssertEqual 5, winheight('.') AssertEqual 5, winheight('.')
wincmd p wincmd p
" Close preview window
normal q
" Close main window
normal q normal q
unlet g:plug_pwindow unlet g:plug_pwindow