diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2025-01-03 10:46:20 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-03 10:46:20 -0800 |
commit | a09c7a5d57ba2aca58fbc00e0b04a1437555a3c0 (patch) | |
tree | 7d068e82e41e44e3325fef63a6a7342234dc900a /test/functional/core | |
parent | b52531a9cbbd1843490333452cd124e8be070690 (diff) | |
parent | 700a25e6218e016b5adb0ddee740be4618d717a2 (diff) | |
download | rneovim-a09c7a5d57ba2aca58fbc00e0b04a1437555a3c0.tar.gz rneovim-a09c7a5d57ba2aca58fbc00e0b04a1437555a3c0.tar.bz2 rneovim-a09c7a5d57ba2aca58fbc00e0b04a1437555a3c0.zip |
Merge #30384 test: spawn_wait()
Diffstat (limited to 'test/functional/core')
-rw-r--r-- | test/functional/core/startup_spec.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index 76b0755441..c9ea280646 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -154,8 +154,9 @@ describe('startup', function() it('failure modes', function() -- nvim -l <empty> - matches('nvim%.?e?x?e?: Argument missing after: "%-l"', fn.system({ nvim_prog, '-l' })) - eq(1, eval('v:shell_error')) + local proc = n.spawn_wait('-l') + matches('nvim%.?e?x?e?: Argument missing after: "%-l"', proc.stderr) + eq(1, proc.status) end) it('os.exit() sets Nvim exitcode', function() @@ -182,13 +183,12 @@ describe('startup', function() end) it('Lua-error sets Nvim exitcode', function() + local proc = n.spawn_wait('-l', 'test/functional/fixtures/startup-fail.lua') + matches('E5113: .* my pearls!!', proc.output) + eq(1, proc.status) + eq(0, eval('v:shell_error')) matches( - 'E5113: .* my pearls!!', - fn.system({ nvim_prog, '-l', 'test/functional/fixtures/startup-fail.lua' }) - ) - eq(1, eval('v:shell_error')) - matches( 'E5113: .* %[string "error%("whoa"%)"%]:1: whoa', fn.system({ nvim_prog, '-l', '-' }, 'error("whoa")') ) |