From 3cd7340b44eef96a6d103b10c8d04886ef0ac785 Mon Sep 17 00:00:00 2001 From: fdai7451 Date: Thu, 19 Jan 2023 14:01:25 +0100 Subject: [PATCH] test: add parse line complex word test --- src/parse.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/parse.rs b/src/parse.rs index 56d30a5..0f452e3 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -26,4 +26,19 @@ mod tests { Ok(("keyword", vec!["arg1".to_string(), "arg2".to_string()])) ) } + + #[test] + fn test_parse_complex() { + assert_eq!( + parse_line("keyword 'this is arg 1' arg2 \"arg3 \""), + Ok(( + "keyword", + vec![ + "this is arg 1".to_string(), + "arg2".to_string(), + "arg3 ".to_string() + ] + )) + ) + } }