From 3e765bd2ec445cbfbaad8ab43c06faaf698e3de7 Mon Sep 17 00:00:00 2001 From: fdai7451 Date: Thu, 19 Jan 2023 14:02:28 +0100 Subject: [PATCH] test: add parse line malformed word test --- src/parse.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/parse.rs b/src/parse.rs index 0f452e3..8da3e59 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -41,4 +41,12 @@ mod tests { )) ) } + + #[test] + fn test_parse_malformed() { + assert_eq!( + parse_line("keyword \"malformed"), + Err(ShellError::MalformedArgs("keyword \"malformed".to_string())) + ) + } }