diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-10-17 00:10:52 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-10-17 01:51:21 +0200 |
commit | 3bcee71cc8ef782fc89de7d72cb784cfb6d984d3 (patch) | |
tree | 189ec9cf3292f113a637b33a45278118dfc1434d /test/functional/plugin/health_spec.lua | |
parent | 014bd59957beb3f94cfb014a7acde3d2544bdfd9 (diff) | |
download | rneovim-3bcee71cc8ef782fc89de7d72cb784cfb6d984d3.tar.gz rneovim-3bcee71cc8ef782fc89de7d72cb784cfb6d984d3.tar.bz2 rneovim-3bcee71cc8ef782fc89de7d72cb784cfb6d984d3.zip |
:checkhealth : validate $VIM
Diffstat (limited to 'test/functional/plugin/health_spec.lua')
-rw-r--r-- | test/functional/plugin/health_spec.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/plugin/health_spec.lua b/test/functional/plugin/health_spec.lua index a91c0b401b..b5374210e6 100644 --- a/test/functional/plugin/health_spec.lua +++ b/test/functional/plugin/health_spec.lua @@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen') local plugin_helpers = require('test.functional.plugin.helpers') local clear = helpers.clear +local curbuf_contents = helpers.curbuf_contents local command = helpers.command local eq = helpers.eq @@ -16,13 +17,12 @@ describe(':checkhealth', function() eq('Invalid $VIMRUNTIME: bogus', string.match(err, 'Invalid.*')) end) it("detects invalid $VIM", function() - clear({ - env={ VIM='bogus', }, - }) - local status, err = pcall(command, 'checkhealth') - eq(false, status) - -- Invalid $VIM causes $VIMRUNTIME to be broken. - eq('Invalid $VIMRUNTIME: bogus', string.match(err, 'Invalid.*')) + clear() + -- Do this after startup, otherwise it just breaks $VIMRUNTIME. + command("let $VIM='zub'") + command("checkhealth nvim") + eq("ERROR: $VIM is invalid: zub", + string.match(curbuf_contents(), "ERROR: $VIM .* zub")) end) end) |