Add additional testcase containing quotes

This commit is contained in:
Yannick Reiß 2025-09-03 04:16:58 +02:00
parent ac23fedf24
commit b4cbc81aaa
1 changed files with 14 additions and 0 deletions

View File

@ -52,3 +52,17 @@ fn test_words_simple() {
let case: Vec<String> = words(testcase);
assert_eq!(case, verify);
}
#[test]
fn test_words_quoted() {
let testcase: &str = "routine \"argument with spaces\" 1234 0x543";
let verify: Vec<String> = vec![
String::from("routine"),
String::from("\"argument with spaces\""),
String::from("1234"),
String::from("0x543"),
];
let case: Vec<String> = words(testcase);
assert_eq!(case, verify);
}