From fad7046aeaca363ab1cd97e6ef8232517ede503f Mon Sep 17 00:00:00 2001 From: fdai7381 Date: Mon, 30 Jan 2023 20:31:28 +0100 Subject: [PATCH] refactoring: sort is builtin tests --- src/builtins/mod.rs | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/builtins/mod.rs b/src/builtins/mod.rs index ed42980..23a8a8b 100644 --- a/src/builtins/mod.rs +++ b/src/builtins/mod.rs @@ -70,18 +70,23 @@ mod tests { use super::*; #[test] - fn test_is_builtin_exit() { - assert_eq!(is_builtin("exit"), true); + fn test_is_builtin_cd() { + assert_eq!(is_builtin("cd"), true); } #[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] - 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] @@ -100,8 +105,13 @@ mod tests { } #[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] @@ -114,16 +124,6 @@ mod tests { 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] fn test_is_builtin_notabuiltin() { assert_eq!(is_builtin("notabuiltin"), false)