diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-05-28 07:09:55 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-06-04 02:09:27 +0200 |
commit | 4211255c755513aa91d4a9277b69b557fc6658ee (patch) | |
tree | cf2a45252abaa216787d1f5e891ad9177348447b /test/functional/core/startup_spec.lua | |
parent | 63058fb5b05a1293dd50851af46f33fc15110829 (diff) | |
download | rneovim-4211255c755513aa91d4a9277b69b557fc6658ee.tar.gz rneovim-4211255c755513aa91d4a9277b69b557fc6658ee.tar.bz2 rneovim-4211255c755513aa91d4a9277b69b557fc6658ee.zip |
startup: allow explicit "-" file arg with --headless
Diffstat (limited to 'test/functional/core/startup_spec.lua')
-rw-r--r-- | test/functional/core/startup_spec.lua | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index b8af5de664..4223e55d90 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -109,25 +109,16 @@ describe('startup', function() ]]) end) it('input from pipe (implicit) + file args #7679', function() - if helpers.pending_win32(pending) then return end - local screen = Screen.new(25, 3) - screen:attach() - if iswin() then - command([[set shellcmdflag=/s\ /c shellxquote=\"]]) - end - command([[exe "terminal echo ohyeah | "]] -- Input from a pipe. - ..[[.shellescape(v:progpath)." -n -u NONE -i NONE --cmd \"]] - ..nvim_set..[[\"]] - ..[[ --cmd \"set shortmess+=I\"]] - ..[[ -c \"echo has('ttyin') has('ttyout') 'bufs='.bufnr('$')\"]] - ..[[ -- test/functional/fixtures/shell-test.c]] - ..[[ test/functional/fixtures/tty-test.c]] - ..[["]]) - screen:expect([[ - ^ohyeah | - 0 1 bufs=3 | - | - ]]) + eq('ohyeah\r\n0 0 bufs=3', + funcs.system({nvim_prog, '-n', '-u', 'NONE', '-i', 'NONE', '--headless', + '+.print', + "+echo has('ttyin') has('ttyout') 'bufs='.bufnr('$')", + '+qall!', + '-', + 'test/functional/fixtures/tty-test.c', + 'test/functional/fixtures/shell-test.c', + }, + { 'ohyeah', '' })) end) it('stdin with -es, -Es #7679', function() @@ -137,15 +128,12 @@ describe('startup', function() -- -- -Es: read stdin as text -- - if not iswin() then eq('partylikeits1999\n', funcs.system({nvim_prog, '-n', '-u', 'NONE', '-i', 'NONE', '-Es', '+.print', 'test/functional/fixtures/tty-test.c' }, - { 'partylikeits1999' })) + { 'partylikeits1999', '' })) eq(inputstr, funcs.system({nvim_prog, '-i', 'NONE', '-Es', '+%print', '-' }, input)) - end - -- -- -es: read stdin as ex-commands |