From c665c64da462245f177b55b4d1083e5020e2999f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 15 Jan 2018 04:29:51 +0100 Subject: [PATCH] tests: harden/fix closing/counting of windows If "PlugUpdate still should not care" fails the window is not closed and the count is off afterwards. This try/finally should get added to more tests probably. --- test/workflow.vader | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/workflow.vader b/test/workflow.vader index b0a43a1..ee6714f 100644 --- a/test/workflow.vader +++ b/test/workflow.vader @@ -689,9 +689,12 @@ Execute (PlugUpdate still should not care): Execute (PlugStatus with no error): PlugStatus Log getline(1, '$') - AssertExpect 'x fzf', 0 - AssertExpect 'Not found', 0 - q + try + AssertExpect 'x fzf', 0 + AssertExpect 'Not found', 0 + finally + q + endtry Execute (Check &rtp after SomeCommand): Log &rtp @@ -1606,6 +1609,8 @@ Execute (#530 - Comparison of incompatible git URIs): Assert !CompareURI('https://github.com/junegunn/vim-plug.git', 'https://github.com:12345/junegunn/vim-plug.git') Execute (#532 - Reuse plug window): + AssertEqual 1, winnr('$'), 'Starts with 1 window' + call plug#begin() Plug 'junegunn/goyo.vim' call plug#end()