From 371f69c556fc73150898f6e401663f5e1ab831e0 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())) + ) + } }