aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/vim_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-01-21 19:58:19 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2018-02-06 20:16:38 +0100
commit4e7d85e6356d88944a60c447a9754b8b37407c12 (patch)
tree95d97925f8e81601a68af39f8660436cb7ef2351 /test/functional/api/vim_spec.lua
parent9af14506e5ae90a3a62814e20d00765fd65d6294 (diff)
downloadrneovim-4e7d85e6356d88944a60c447a9754b8b37407c12.tar.gz
rneovim-4e7d85e6356d88944a60c447a9754b8b37407c12.tar.bz2
rneovim-4e7d85e6356d88944a60c447a9754b8b37407c12.zip
shell: update `execute('!cmd')` test to new behavior
And similarly nvim_command_output test
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r--test/functional/api/vim_spec.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index a92acd36b1..0a0cb2e91c 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -15,6 +15,7 @@ local command = helpers.command
local intchar2lua = global_helpers.intchar2lua
local format_string = global_helpers.format_string
local mergedicts_copy = global_helpers.mergedicts_copy
+local uname = global_helpers.uname
describe('api', function()
before_each(clear)
@@ -99,8 +100,9 @@ describe('api', function()
[[echo nvim_command_output('echo "nested1\nnested2"') | ls]]))
end)
- it('does not return shell |:!| output', function()
- eq(':!echo "foo"\r\n', nvim('command_output', [[!echo "foo"]]))
+ it('returns shell |:!| output', function()
+ local win_lf = (uname() == 'Windows' and '\r') or ''
+ eq(':!echo foo\r\n\nfoo'..win_lf..'\n', nvim('command_output', [[!echo foo]]))
end)
it("parse error: fails (specific error), does NOT update v:errmsg", function()