Support multiple exit codes

..with more specific error enums.
This commit is contained in:
Dustin J. Mitchell 2021-05-03 17:57:04 -04:00
parent 2345a57940
commit bb7130f960
23 changed files with 112 additions and 34 deletions

View file

@ -56,7 +56,8 @@ fn invalid_option() -> Result<(), Box<dyn std::error::Error>> {
cmd.arg("--no-such-option");
cmd.assert()
.failure()
.stderr(predicate::str::contains("command line not recognized"));
.stderr(predicate::str::contains("command line not recognized"))
.code(predicate::eq(3));
Ok(())
}