Browse Source

test: add parse line complex word test

main
fdai7451 2 years ago
parent
commit
3cd7340b44
  1. 15
      src/parse.rs

15
src/parse.rs

@ -26,4 +26,19 @@ mod tests {
Ok(("keyword", vec!["arg1".to_string(), "arg2".to_string()])) 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()
]
))
)
}
} }
Loading…
Cancel
Save