Skip to content

Commit

Permalink
win: enable backtick_expansion and bang_filter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
janlazo committed Feb 1, 2018
1 parent 6710164 commit 6e077b2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 21 deletions.
16 changes: 12 additions & 4 deletions test/functional/eval/backtick_expansion_spec.lua
Expand Up @@ -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()
Expand Down
39 changes: 22 additions & 17 deletions test/functional/ex_cmds/bang_filter_spec.lua
Expand Up @@ -4,8 +4,6 @@ local helpers = require('test.functional.helpers')(after_each)
local feed, command, clear = helpers.feed, helpers.command, helpers.clear
local mkdir, write_file, rmdir = helpers.mkdir, helpers.write_file, helpers.rmdir

if helpers.pending_win32(pending) then return end

local Screen = require('test.functional.ui.screen')


Expand All @@ -28,23 +26,30 @@ describe('issues', function()
end)

it('#3269 Last line of shell output is not truncated', 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]])
screen:expect([[
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
:!ls bang_filter_spec |
|
f1 |
f2 |
f3 |
Press ENTER or type command to continue^ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
~ |
]]
.. result .. [[
|
f1 |
f2 |
f3 |
Press ENTER or type command to continue^ |
]])
end)

Expand Down

0 comments on commit 6e077b2

Please sign in to comment.