aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/core/job_spec.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index 34168e10c2..eb02610df0 100644
--- a/test/functional/core/job_spec.lua
+++ b/test/functional/core/job_spec.lua
@@ -17,6 +17,7 @@ local pathroot = helpers.pathroot
local nvim_set = helpers.nvim_set
local expect_twostreams = helpers.expect_twostreams
local expect_msg_seq = helpers.expect_msg_seq
+local expect_err = helpers.expect_err
local Screen = require('test.functional.ui.screen')
-- Kill process with given pid
@@ -115,6 +116,17 @@ describe('jobs', function()
ok(string.find(err, "E475: Invalid argument: expected valid directory$") ~= nil)
end)
+ it('produces error when using non-executable `cwd`', function()
+ if iswin() then return end -- N/A for Windows
+
+ local dir = 'Xtest_not_executable_dir'
+ mkdir(dir)
+ funcs.setfperm(dir, 'rw-------')
+ expect_err('E475: Invalid argument: expected valid directory$', nvim,
+ 'command', "call jobstart('pwd', {'cwd': '" .. dir .. "'})")
+ rmdir(dir)
+ end)
+
it('returns 0 when it fails to start', function()
eq("", eval("v:errmsg"))
feed_command("let g:test_jobid = jobstart([])")