From b4cbc81aaa933167c4339f4f5d251bbdf26cadb7 Mon Sep 17 00:00:00 2001 From: yannickreiss Date: Wed, 3 Sep 2025 04:16:58 +0200 Subject: [PATCH] Add additional testcase containing quotes --- src/tests.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/tests.rs b/src/tests.rs index f81f7e2..76202aa 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -52,3 +52,17 @@ fn test_words_simple() { let case: Vec = words(testcase); assert_eq!(case, verify); } + +#[test] +fn test_words_quoted() { + let testcase: &str = "routine \"argument with spaces\" 1234 0x543"; + let verify: Vec = vec![ + String::from("routine"), + String::from("\"argument with spaces\""), + String::from("1234"), + String::from("0x543"), + ]; + + let case: Vec = words(testcase); + assert_eq!(case, verify); +}