Skip to content

Commit

Permalink
test(process): fix exit code test
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarriga committed Mar 22, 2024
1 parent 7054695 commit 33c62b3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/process_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,21 @@ describe("process", function()
process.signal(15)

local exit_code = process.result()
assert.equal(15, exit_code)
assert.equal(0, exit_code)
end)

a.it("returns exit code", function()
local pipe = assert(vim.loop.new_pipe())

local process = assert(nio.process.run({
cmd = "bash",
args = { "-c", "exit 1" },
stdin = pipe,
}))

process.signal(15)

local exit_code = process.result()
assert.equal(0, exit_code)
end)
end)

0 comments on commit 33c62b3

Please sign in to comment.