Small cleanup to test-spawn.lua
This removes a duplicate test and moves some "spawn with empty string as argument" up to the long list of similar tests (and adds error checking). I do not see the point of the assert(#client.get() == 0) and so it was just dropped. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
461da9ea4b
commit
59cd409517
|
@ -29,6 +29,9 @@ local steps = {
|
||||||
error_message = spawn(" ")
|
error_message = spawn(" ")
|
||||||
assert(string.find(error_message, 'Text was empty'), error_message)
|
assert(string.find(error_message, 'Text was empty'), error_message)
|
||||||
|
|
||||||
|
error_message = spawn("")
|
||||||
|
assert(string.find(error_message, 'Text was empty'), error_message)
|
||||||
|
|
||||||
error_message = spawn{}
|
error_message = spawn{}
|
||||||
assert(string.find(error_message, 'There is nothing to execute'), error_message)
|
assert(string.find(error_message, 'There is nothing to execute'), error_message)
|
||||||
|
|
||||||
|
@ -90,17 +93,6 @@ local steps = {
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
function()
|
|
||||||
-- Test empty command table
|
|
||||||
spawn{}
|
|
||||||
return true
|
|
||||||
end,
|
|
||||||
function()
|
|
||||||
-- Test empty command string
|
|
||||||
spawn("")
|
|
||||||
assert(#client.get() == 0)
|
|
||||||
return true
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
runner.run_steps(steps)
|
runner.run_steps(steps)
|
||||||
|
|
Loading…
Reference in New Issue