diff options
author | Aaron Williamson <guitarfanman@gmail.com> | 2016-11-24 17:23:54 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-12-10 16:01:27 +0100 |
commit | c8d5e9230ee3ddc530ddb251fbe11e3b02293c80 (patch) | |
tree | 9774ff47bf68f6669e60c14cf9871ebac87be826 /test | |
parent | f344e40699e136a5185502ac661e64ec1b5f4184 (diff) | |
download | rneovim-c8d5e9230ee3ddc530ddb251fbe11e3b02293c80.tar.gz rneovim-c8d5e9230ee3ddc530ddb251fbe11e3b02293c80.tar.bz2 rneovim-c8d5e9230ee3ddc530ddb251fbe11e3b02293c80.zip |
jobstart(): Return -1 if cmd is not executable. #5671
Closes #5465
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 |