Skip to content
Snippets Groups Projects

Resolve "panic when entering "a""

Merged aalbert requested to merge 71-panic-when-entering-a into main
1 file
+ 9
0
Compare changes
  • Side-by-side
  • Inline
+ 9
0
@@ -88,6 +88,15 @@ fn is_command(input: &str) -> bool {
#[cfg(test)]
mod tests {
#[test]
fn is_command_no_crash() {
assert!(!super::is_command(""));
assert!(super::is_command("a"));
assert!(super::is_command("aa"));
assert!(super::is_command("aaa"));
assert!(super::is_command("aaaa"));
}
#[test]
fn is_command_false() {
assert!(!super::is_command(" "));
Loading