aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/system_spec.lua
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2018-04-14 20:43:18 -0400
committerJustin M. Keyes <justinkz@gmail.com>2018-04-15 02:43:18 +0200
commit5abfa94ed28e7058372b8368b53162c1c92cbc4e (patch)
tree15de913c659933103e0f82b86dedbaad25c64538 /test/functional/eval/system_spec.lua
parenta7e7f7bd83abc5c31008e40556f794d9b00db431 (diff)
downloadrneovim-5abfa94ed28e7058372b8368b53162c1c92cbc4e.tar.gz
rneovim-5abfa94ed28e7058372b8368b53162c1c92cbc4e.tar.bz2
rneovim-5abfa94ed28e7058372b8368b53162c1c92cbc4e.zip
test: win: use "start" to test backgrounded job (#8171)
Diffstat (limited to 'test/functional/eval/system_spec.lua')
-rw-r--r--test/functional/eval/system_spec.lua8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/functional/eval/system_spec.lua b/test/functional/eval/system_spec.lua
index 201426c40b..23cea4c038 100644
--- a/test/functional/eval/system_spec.lua
+++ b/test/functional/eval/system_spec.lua
@@ -255,10 +255,8 @@ describe('system()', function()
end
end)
it('to backgrounded command does not crash', function()
- -- cmd.exe doesn't background a command with &
- if iswin() then return end
-- This is indeterminate, just exercise the codepath. May get E5677.
- feed_command('call system("echo -n echoed &")')
+ feed_command('call system(has("win32") ? "start /b /wait cmd /c echo echoed" : "echo -n echoed &")')
local v_errnum = string.match(eval("v:errmsg"), "^E%d*:")
if v_errnum then
eq("E5677:", v_errnum)
@@ -272,10 +270,8 @@ describe('system()', function()
eq("input", eval('system("cat -", "input")'))
end)
it('to backgrounded command does not crash', function()
- -- cmd.exe doesn't background a command with &
- if iswin() then return end
-- This is indeterminate, just exercise the codepath. May get E5677.
- feed_command('call system("cat - &", "input")')
+ feed_command('call system(has("win32") ? "start /b /wait more" : "cat - &", "input")')
local v_errnum = string.match(eval("v:errmsg"), "^E%d*:")
if v_errnum then
eq("E5677:", v_errnum)