From 4a2c5d713cf116b47b183a7fec37568a762be11e Mon Sep 17 00:00:00 2001 From: fdai7381 Date: Fri, 20 Jan 2023 12:54:00 +0100 Subject: [PATCH] test: add exit without args test --- src/builtins/exit.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/builtins/exit.rs b/src/builtins/exit.rs index cd71554..323f911 100644 --- a/src/builtins/exit.rs +++ b/src/builtins/exit.rs @@ -17,4 +17,9 @@ mod tests { fn test_exit() { assert_eq!(Exit.execute(vec!["arg".to_string()]), Err(ShellError::Exit)) } + + #[test] + fn test_exit_without_args() { + assert_eq!(Exit.execute(vec![]), Err(ShellError::Exit)) + } }