Browse Source

test: add exit without args test

main
fdai7381 2 years ago
parent
commit
289e07e3b6
  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