Skip to content

Commit

Permalink
text: windows carriage
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis6991 committed Jun 6, 2023
1 parent a5441fa commit 5fa0bd0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/functional/lua/system_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ describe('vim.system', function()
for name, system in pairs{ sync = system_sync, async = system_async, } do
describe('('..name..')', function()
it('can run simple commands', function()
eq('hello\n', system({'echo', 'hello'}).stdout)
eq('hello\n', system({ cmd = {'echo', 'hello' } }).stdout)
eq('hello\n', system({ cmd = 'echo', args = {'hello'} }).stdout)
eq('hello\n', system({'echo', 'hello'}).stdout:gsub('\r\n?', '\n'))
eq('hello\n', system({ cmd = {'echo', 'hello' } }).stdout:gsub('\r\n?', '\n'))
eq('hello\n', system({ cmd = 'echo', args = {'hello'} }).stdout:gsub('\r\n?', '\n'))
end)

it('handle input', function()
eq('hellocat', system({ cmd = 'cat', stdin = 'hellocat' }).stdout)
eq('hello\ncat\n', system({ cmd = 'cat', stdin = {'hello', 'cat'} }).stdout)
eq('hellocat', system({ cmd = 'cat', stdin = 'hellocat' }).stdout:gsub('\r\n?', '\n'))
eq('hello\ncat\n', system({ cmd = 'cat', stdin = {'hello', 'cat'} }).stdout:gsub('\r\n?', '\n'))
end)

it ('supports timeout', function()
Expand Down

0 comments on commit 5fa0bd0

Please sign in to comment.