tests(cmd): ensure wrong meta commands are recognized
This commit is contained in:
parent
848775587e
commit
32cfdfa07f
3 changed files with 21 additions and 2 deletions
|
|
@ -133,4 +133,9 @@ mod tests {
|
|||
fn test_parse_wrong_statement() {
|
||||
assert_debug_snapshot!("salact".parse::<Command>());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_wrong_meta_command() {
|
||||
assert_debug_snapshot!(".halp".parse::<Command>());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
source: src/command.rs
|
||||
expression: "\".halp\".parse::<Command>()"
|
||||
---
|
||||
Err(
|
||||
MetaCommand(
|
||||
Unrecognized {
|
||||
cmd: ".halp",
|
||||
},
|
||||
),
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue