Merge pull request #2627 from szabgab/test/empty-cli

test the command line without any parameters #1568
This commit is contained in:
Eric Huss 2025-03-31 18:06:55 +00:00 committed by GitHub
commit 629c09df4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,3 +32,15 @@ fn mdbook_cli_detects_book_with_failing_tests() {
.stderr(predicates::str::is_match(r##"returned an error:\n\n"##).unwrap())
.stderr(predicates::str::is_match(r##"Nested_Chapter::Rustdoc_include_works_with_anchors_too \(line \d+\) ... FAILED"##).unwrap());
}
#[test]
fn empty_cli() {
let mut cmd = mdbook_cmd();
cmd.assert()
.failure()
.code(2)
.stdout(predicates::str::is_empty())
.stderr(predicates::str::contains(
"Creates a book from markdown files",
));
}