Browse Source

refactoring: sort is builtin tests

main
fdai7381 2 years ago
parent
commit
fad7046aea
  1. 36
      src/builtins/mod.rs

36
src/builtins/mod.rs

@ -70,18 +70,23 @@ mod tests {
use super::*; use super::*;
#[test] #[test]
fn test_is_builtin_exit() {
assert_eq!(is_builtin("exit"), true);
fn test_is_builtin_cd() {
assert_eq!(is_builtin("cd"), true);
} }
#[test] #[test]
fn test_is_builtin_cd() {
assert_eq!(is_builtin("cd"), true);
fn test_is_builtin_change_prompt() {
assert_eq!(is_builtin("change-prompt"), true);
} }
#[test] #[test]
fn test_is_builtin_pwd() {
assert_eq!(is_builtin("pwd"), true);
fn test_is_builtin_exit() {
assert_eq!(is_builtin("exit"), true);
}
#[test]
fn test_is_builtin_fetch() {
assert_eq!(is_builtin("fetch"), true);
} }
#[test] #[test]
@ -100,8 +105,13 @@ mod tests {
} }
#[test] #[test]
fn test_is_builtin_change_prompt() {
assert_eq!(is_builtin("change-prompt"), true);
fn test_is_builtin_pwd() {
assert_eq!(is_builtin("pwd"), true);
}
#[test]
fn test_is_builtin_segfault() {
assert_eq!(is_builtin("segfault"), true);
} }
#[test] #[test]
@ -114,16 +124,6 @@ mod tests {
assert_eq!(is_builtin("quote"), true); assert_eq!(is_builtin("quote"), true);
} }
#[test]
fn test_is_builtin_fetch() {
assert_eq!(is_builtin("fetch"), true);
}
#[test]
fn test_is_builtin_segfault() {
assert_eq!(is_builtin("segfault"), true);
}
#[test] #[test]
fn test_is_builtin_notabuiltin() { fn test_is_builtin_notabuiltin() {
assert_eq!(is_builtin("notabuiltin"), false) assert_eq!(is_builtin("notabuiltin"), false)

Loading…
Cancel
Save