diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/core/job_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/fixtures/non_executable.txt | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index 9d24ba62db..61bd4f8b44 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -70,6 +70,12 @@ describe('jobs', function() ok(rv ~= nil) end) + it('returns -1 when target is not executable', function() + local rv = eval("jobstart(['./test/functional/fixtures/non_executable.txt'])") + eq(-1, rv) + eq("", eval("v:errmsg")) + end) + it('invokes callbacks when the job writes and exits', function() nvim('command', "call jobstart(['echo'], g:job_opts)") eq({'notification', 'stdout', {0, {'', ''}}}, next_msg()) diff --git a/test/functional/fixtures/non_executable.txt b/test/functional/fixtures/non_executable.txt new file mode 100644 index 0000000000..cc27ecc664 --- /dev/null +++ b/test/functional/fixtures/non_executable.txt @@ -0,0 +1 @@ +This file is not an executable |