aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/execute_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-02-06 22:58:38 +0100
committerGitHub <noreply@github.com>2018-02-06 22:58:38 +0100
commit2a4c9c6e4573ebeaaf5d30aeb2c8a9ce2ecab0d5 (patch)
treea2ec5e3873226f665f1e809d415c46539811173e /test/functional/eval/execute_spec.lua
parent0851057a8deaa1197bd0af22babb62c1146d836c (diff)
parent6744f48d884902483f95c9b89877da36032e2677 (diff)
downloadrneovim-2a4c9c6e4573ebeaaf5d30aeb2c8a9ce2ecab0d5.tar.gz
rneovim-2a4c9c6e4573ebeaaf5d30aeb2c8a9ce2ecab0d5.tar.bz2
rneovim-2a4c9c6e4573ebeaaf5d30aeb2c8a9ce2ecab0d5.zip
Merge pull request #7844 from bfredl/shellout
shell: use msg functions for :!cmd so UTF-8 and binary is supported.
Diffstat (limited to 'test/functional/eval/execute_spec.lua')
-rw-r--r--test/functional/eval/execute_spec.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/functional/eval/execute_spec.lua b/test/functional/eval/execute_spec.lua
index 91966ed3dd..c866359520 100644
--- a/test/functional/eval/execute_spec.lua
+++ b/test/functional/eval/execute_spec.lua
@@ -1,4 +1,5 @@
local helpers = require('test.functional.helpers')(after_each)
+local global_helpers = require('test.helpers')
local eq = helpers.eq
local eval = helpers.eval
local clear = helpers.clear
@@ -9,6 +10,7 @@ local funcs = helpers.funcs
local Screen = require('test.functional.ui.screen')
local command = helpers.command
local feed = helpers.feed
+local uname = global_helpers.uname
describe('execute()', function()
before_each(clear)
@@ -118,9 +120,11 @@ describe('execute()', function()
feed('<CR>')
end)
- -- This matches Vim behavior.
- it('does not capture shell-command output', function()
- eq('\n:!echo "foo"\13\n', funcs.execute('!echo "foo"'))
+ -- This deviates from vim behavior, but is consistent
+ -- with how nvim currently displays the output.
+ it('does capture shell-command output', function()
+ local win_lf = (uname() == 'Windows' and '\13') or ''
+ eq('\n:!echo foo\r\n\nfoo'..win_lf..'\n', funcs.execute('!echo foo'))
end)
describe('{silent} argument', function()