Browse Source

test: add exit test

main
fdai7381 2 years ago
parent
commit
5e82870c49
  1. 10
      src/builtins/exit.rs

10
src/builtins/exit.rs

@ -8,3 +8,13 @@ impl Builtin for Exit {
Err(ShellError::Exit) Err(ShellError::Exit)
} }
} }
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_exit() {
assert_eq!(Exit.execute(vec!["arg".to_string()]), Err(ShellError::Exit))
}
}
Loading…
Cancel
Save