From 1597fe1dbc82ff6f2185f3477c5617ae3cff69da Mon Sep 17 00:00:00 2001 From: fdai7451 Date: Thu, 19 Jan 2023 13:58:11 +0100 Subject: [PATCH] test: add parse line single word test --- src/parse.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/parse.rs b/src/parse.rs index 5e2ebff..bdcecfa 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -9,3 +9,13 @@ pub fn parse_line(line: &str) -> Result<(&str, Vec), ShellError> { Err(ShellError::MalformedArgs(unparsed_args.to_string())) } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_parse_single() { + assert_eq!(parse_line("keyword"), Ok(("keyword", vec![]))) + } +}