From 8d58012786b837380e6006d38580852d9506fbc8 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 24 Oct 2017 17:38:18 -0400 Subject: test: use unix fileformat to test NULs on systemlist --- test/functional/eval/system_spec.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/functional/eval') diff --git a/test/functional/eval/system_spec.lua b/test/functional/eval/system_spec.lua index 7e213e2156..96212bf538 100644 --- a/test/functional/eval/system_spec.lua +++ b/test/functional/eval/system_spec.lua @@ -442,11 +442,13 @@ describe('systemlist()', function() describe('with output containing NULs', function() local fname = 'Xtest' - before_each(create_file_with_nuls(fname)) + before_each(function() + command('set ff=unix') + create_file_with_nuls(fname)() + end) after_each(delete_file(fname)) it('replaces NULs by newline characters', function() - if helpers.pending_win32(pending) then return end eq({'part1\npart2\npart3'}, eval('systemlist("cat '..fname..'")')) end) end) -- cgit From d4485f7cc0e4bab7d8ca41590956fa96d31f6aab Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 6 Nov 2017 21:00:19 -0500 Subject: win: test: check non-shell system() --- test/functional/eval/system_spec.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/functional/eval') diff --git a/test/functional/eval/system_spec.lua b/test/functional/eval/system_spec.lua index 96212bf538..74c3b77d91 100644 --- a/test/functional/eval/system_spec.lua +++ b/test/functional/eval/system_spec.lua @@ -89,7 +89,9 @@ describe('system()', function() end) it('does NOT run in shell', function() - if not iswin() then + if iswin() then + eq("%PATH%\n", eval("system(['powershell', '-NoProfile', '-NoLogo', '-ExecutionPolicy', 'RemoteSigned', '-Command', 'echo', '%PATH%'])")) + else eq("* $PATH %PATH%\n", eval("system(['echo', '*', '$PATH', '%PATH%'])")) end end) -- cgit From ab1e11e44fd17ffbd4c1fdb26c2b03de3c6831ae Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 3 Jan 2018 00:18:34 -0500 Subject: test: win: yes is unavailable on Windows --- test/functional/eval/system_spec.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'test/functional/eval') diff --git a/test/functional/eval/system_spec.lua b/test/functional/eval/system_spec.lua index 74c3b77d91..e2b12b6bc9 100644 --- a/test/functional/eval/system_spec.lua +++ b/test/functional/eval/system_spec.lua @@ -187,6 +187,7 @@ describe('system()', function() end) it('`yes` and is interrupted with CTRL-C', function() + if helpers.pending_win32(pending) then return end feed(':call system("yes")') screen:expect([[ | -- cgit