From c03a847884c017a78e099beaa1b252e5f940c8e0 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 3 Oct 2017 17:39:17 -0400 Subject: [PATCH] win: enable backtick_expansion and shell output tests --- test/functional/eval/backtick_expansion_spec.lua | 16 ++++++++++++---- test/functional/ui/output_spec.lua | 9 +++++++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/test/functional/eval/backtick_expansion_spec.lua b/test/functional/eval/backtick_expansion_spec.lua index 81e8e295fa..b1b44cfa8b 100644 --- a/test/functional/eval/backtick_expansion_spec.lua +++ b/test/functional/eval/backtick_expansion_spec.lua @@ -21,11 +21,19 @@ describe("backtick expansion", function() end) it("with default 'shell'", function() - if helpers.pending_win32(pending) then return end -- Need win32 shell fixes - command(":silent args `echo ***2`") + if helpers.iswin() then + command(":silent args `dir /b *2`") + else + command(":silent args `echo ***2`") + end eq({ "file2", }, eval("argv()")) - command(":silent args `echo */*4`") - eq({ "subdir/file4", }, eval("argv()")) + if helpers.iswin() then + command(":silent args `dir /s/b *4`") + eq({ "subdir\\file4", }, eval("map(argv(), 'fnamemodify(v:val, \":.\")')")) + else + command(":silent args `echo */*4`") + eq({ "subdir/file4", }, eval("argv()")) + end end) it("with shell=fish", function() diff --git a/test/functional/ui/output_spec.lua b/test/functional/ui/output_spec.lua index 14f2091046..4246020fab 100644 --- a/test/functional/ui/output_spec.lua +++ b/test/functional/ui/output_spec.lua @@ -162,14 +162,19 @@ describe("shell command :!", function() end) it("doesn't truncate Last line of shell output #3269", function() - command([[nnoremap \l :!ls bang_filter_spec]]) + command(helpers.iswin() + and [[nnoremap \l :!dir /b bang_filter_spec]] + or [[nnoremap \l :!ls bang_filter_spec]]) + local result = (helpers.iswin() + and [[:!dir /b bang_filter_spec]] + or [[:!ls bang_filter_spec ]]) feed([[\l]]) screen:expect([[ {1:~ }| {1:~ }| {1:~ }| {1:~ }| - :!ls bang_filter_spec | + ]]..result..[[ | f1 | f2 | f3 |