mirror of
https://github.com/neovim/neovim.git
synced 2025-12-18 12:25:34 +00:00
win: enable backtick_expansion and shell output tests
This commit is contained in:
committed by
Björn Linse
parent
f75c4b39ec
commit
c03a847884
@@ -21,11 +21,19 @@ describe("backtick expansion", function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it("with default 'shell'", function()
|
it("with default 'shell'", function()
|
||||||
if helpers.pending_win32(pending) then return end -- Need win32 shell fixes
|
if helpers.iswin() then
|
||||||
|
command(":silent args `dir /b *2`")
|
||||||
|
else
|
||||||
command(":silent args `echo ***2`")
|
command(":silent args `echo ***2`")
|
||||||
|
end
|
||||||
eq({ "file2", }, eval("argv()"))
|
eq({ "file2", }, 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`")
|
command(":silent args `echo */*4`")
|
||||||
eq({ "subdir/file4", }, eval("argv()"))
|
eq({ "subdir/file4", }, eval("argv()"))
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it("with shell=fish", function()
|
it("with shell=fish", function()
|
||||||
|
|||||||
@@ -162,14 +162,19 @@ describe("shell command :!", function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it("doesn't truncate Last line of shell output #3269", function()
|
it("doesn't truncate Last line of shell output #3269", function()
|
||||||
command([[nnoremap <silent>\l :!ls bang_filter_spec<cr>]])
|
command(helpers.iswin()
|
||||||
|
and [[nnoremap <silent>\l :!dir /b bang_filter_spec<cr>]]
|
||||||
|
or [[nnoremap <silent>\l :!ls bang_filter_spec<cr>]])
|
||||||
|
local result = (helpers.iswin()
|
||||||
|
and [[:!dir /b bang_filter_spec]]
|
||||||
|
or [[:!ls bang_filter_spec ]])
|
||||||
feed([[\l]])
|
feed([[\l]])
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
:!ls bang_filter_spec |
|
]]..result..[[ |
|
||||||
f1 |
|
f1 |
|
||||||
f2 |
|
f2 |
|
||||||
f3 |
|
f3 |
|
||||||
|
|||||||
Reference in New Issue
Block a user