mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 21:10:36 +00:00
Implement missing test case
This commit is contained in:
parent
8e58a8ed10
commit
63989af21f
3 changed files with 6 additions and 0 deletions
|
@ -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<()> {
|
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 {
|
if let Some(code) = exit_code {
|
||||||
exit(code);
|
exit(code);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -98,6 +98,7 @@ mod tests {
|
||||||
fs_dirs: "fs/dirs",
|
fs_dirs: "fs/dirs",
|
||||||
process_args: "process/args",
|
process_args: "process/args",
|
||||||
process_env: "process/env",
|
process_env: "process/env",
|
||||||
|
process_exit: "process/exit",
|
||||||
process_spawn: "process/spawn",
|
process_spawn: "process/spawn",
|
||||||
net_request_codes: "net/request/codes",
|
net_request_codes: "net/request/codes",
|
||||||
net_request_methods: "net/request/methods",
|
net_request_methods: "net/request/methods",
|
||||||
|
|
3
src/tests/process/exit.luau
Normal file
3
src/tests/process/exit.luau
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
process.exit(0)
|
||||||
|
|
||||||
|
error("Process should have exited successfully")
|
Loading…
Reference in a new issue