Browse Source

test: add exit without args test

main
fdai7381 2 years ago
committed by fdai7451
parent
commit
4a2c5d713c
  1. 5
      src/builtins/exit.rs

5
src/builtins/exit.rs

@ -17,4 +17,9 @@ mod tests {
fn test_exit() { fn test_exit() {
assert_eq!(Exit.execute(vec!["arg".to_string()]), Err(ShellError::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))
}
} }
Loading…
Cancel
Save