Browse Source

test: add parse line single word test

main
fdai7451 2 years ago
parent
commit
1597fe1dbc
  1. 10
      src/parse.rs

10
src/parse.rs

@ -9,3 +9,13 @@ pub fn parse_line(line: &str) -> Result<(&str, Vec<String>), ShellError> {
Err(ShellError::MalformedArgs(unparsed_args.to_string()))
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_parse_single() {
assert_eq!(parse_line("keyword"), Ok(("keyword", vec![])))
}
}
Loading…
Cancel
Save