aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/job_spec.lua
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-12-24 07:53:56 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-12-24 07:53:56 +0100
commitb3686b1597ea202de464df72a88fb5c76fd1b814 (patch)
tree558e4c3a3eadc2e4338cbe24fd785b2bf774a5fd /test/functional/core/job_spec.lua
parent53fe877a97dbe5e5b5291fd1361123fc1b1da054 (diff)
downloadrneovim-b3686b1597ea202de464df72a88fb5c76fd1b814.tar.gz
rneovim-b3686b1597ea202de464df72a88fb5c76fd1b814.tar.bz2
rneovim-b3686b1597ea202de464df72a88fb5c76fd1b814.zip
system(), jobstart(): raise error on non-executable #11234
* tv_to_argv: error when cmd is not executable Callers always assume that emsg was emitted: - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L12509 - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L17923 - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L18202 * test/functional/provider: display reason from missing_provider * provider#node#Detect: skip / handle non-existing node executable
Diffstat (limited to 'test/functional/core/job_spec.lua')
-rw-r--r--test/functional/core/job_spec.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index e5d4444b92..b63b868127 100644
--- a/test/functional/core/job_spec.lua
+++ b/test/functional/core/job_spec.lua
@@ -185,11 +185,10 @@ describe('jobs', function()
return eval([[jobstart('')]])
end
local executable_jobid = new_job()
- local nonexecutable_jobid = eval("jobstart(['"..(iswin()
- and './test/functional/fixtures'
- or './test/functional/fixtures/non_executable.txt').."'])")
- eq(-1, nonexecutable_jobid)
- -- Should _not_ throw an error.
+
+ local exe = iswin() and './test/functional/fixtures' or './test/functional/fixtures/non_executable.txt'
+ eq("Vim:E475: Invalid value for argument cmd: '"..exe.."' is not executable",
+ pcall_err(eval, "jobstart(['"..exe.."'])"))
eq("", eval("v:errmsg"))
-- Non-executable job should not increment the job ids. #5465
eq(executable_jobid + 1, new_job())