tests: add test for passing an invalid signal
Bug fixed in commit 16c615056e914ed4342e6a307b40db80485acde2; add a test to prevent it from happening again. Fixes: https://todo.sr.ht/~jeremy/callisto/2
This commit is contained in:
parent
41829c3170
commit
c8413899e3
1 changed files with 8 additions and 0 deletions
8
test.lua
8
test.lua
|
@ -195,6 +195,14 @@ fs.remove("%s")]]):format(
|
|||
local sig = "SIGKILL"
|
||||
|
||||
assert(math.type(process.signum(sig)) == "integer")
|
||||
|
||||
-- https://todo.sr.ht/~jeremy/callisto/2
|
||||
local ok, err = pcall(function ()
|
||||
process.signum("SIGHELLO")
|
||||
end)
|
||||
assert(not ok)
|
||||
assert(err:find("no such signal$"))
|
||||
|
||||
return 'process.signum("' .. sig .. '")'
|
||||
end,
|
||||
send = function ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue