Browse Source

test: add parse line test

main
fdai7381 2 years ago
parent
commit
33834a4afa
  1. 10
      src/parse.rs

10
src/parse.rs

@ -23,7 +23,15 @@ mod tests {
fn test_tokenize() {
assert_eq!(
tokenize("test arg1 arg2 arg3"),
["test", "arg1", "arg2", "arg3"]
vec!["test", "arg1", "arg2", "arg3"]
);
}
#[test]
fn test_parse_line() {
assert_eq!(
parse_line("test arg1 arg2 arg3"),
("test", vec!["arg1", "arg2", "arg3"])
);
}
}
Loading…
Cancel
Save