diff --git a/src/parse.rs b/src/parse.rs index ceef7e8..e6e3765 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -13,4 +13,17 @@ pub fn parse_line(line: &str) -> (&str, Vec<&str>) { fn tokenize(line: &str) -> Vec<&str> { line.trim().split(' ').collect::>() -} \ No newline at end of file +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_tokenize() { + assert_eq!( + tokenize("test arg1 arg2 arg3"), + ["test", "arg1", "arg2", "arg3"] + ); + } +}