Implement missing test case

This commit is contained in:
Filip Tibell 2023-01-21 02:05:16 -05:00
parent 8e58a8ed10
commit 63989af21f
No known key found for this signature in database
3 changed files with 6 additions and 0 deletions

View file

@ -119,6 +119,8 @@ fn process_env_iter<'lua>(lua: &'lua Lua, (_, _): (Value<'lua>, ())) -> Result<F
}
fn process_exit(_: &Lua, exit_code: Option<i32>) -> Result<()> {
// TODO: Exit gracefully to the root with an Ok
// result instead of completely exiting the process
if let Some(code) = exit_code {
exit(code);
} else {

View file

@ -98,6 +98,7 @@ mod tests {
fs_dirs: "fs/dirs",
process_args: "process/args",
process_env: "process/env",
process_exit: "process/exit",
process_spawn: "process/spawn",
net_request_codes: "net/request/codes",
net_request_methods: "net/request/methods",

View file

@ -0,0 +1,3 @@
process.exit(0)
error("Process should have exited successfully")