diff options
| -rw-r--r-- | tests/core/spawn_spec.lua | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/core/spawn_spec.lua b/tests/core/spawn_spec.lua index c7b4f320..73bcdf28 100644 --- a/tests/core/spawn_spec.lua +++ b/tests/core/spawn_spec.lua @@ -163,7 +163,7 @@ describe("async spawn", function() ) it( - "should skip checking executable", + "should check whether command is executable", async_test(function() local result = spawn.my_cmd {} assert.is_true(result:is_failure()) @@ -173,4 +173,17 @@ describe("async spawn", function() ) end) ) + + it( + "should skip checking whether command is executable", + async_test(function() + stub(process, "spawn", function(_, _, callback) + callback(false, 127) + end) + + local result = spawn.my_cmd { check_executable = false } + assert.is_true(result:is_failure()) + assert.spy(process.spawn).was_called(1) + end) + ) end) |
