From 0d92a80707fcc40063b48c816b5900621ec89dec Mon Sep 17 00:00:00 2001 From: fdai7451 Date: Thu, 19 Jan 2023 13:59:57 +0100 Subject: [PATCH] test: add parse line multiple word test --- src/parse.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/parse.rs b/src/parse.rs index bdcecfa..56d30a5 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -18,4 +18,12 @@ mod tests { fn test_parse_single() { assert_eq!(parse_line("keyword"), Ok(("keyword", vec![]))) } + + #[test] + fn test_parse_multiple() { + assert_eq!( + parse_line("keyword arg1 arg2"), + Ok(("keyword", vec!["arg1".to_string(), "arg2".to_string()])) + ) + } }