Add additional testcase containing quotes
This commit is contained in:
parent
ac23fedf24
commit
b4cbc81aaa
14
src/tests.rs
14
src/tests.rs
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue