Skip to content

Commit 629c09d

Browse files
authored
Merge pull request #2627 from szabgab/test/empty-cli
test the command line without any parameters #1568
2 parents a3c0ecd + 7247e5f commit 629c09d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/cli/test.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,15 @@ fn mdbook_cli_detects_book_with_failing_tests() {
3232
.stderr(predicates::str::is_match(r##"returned an error:\n\n"##).unwrap())
3333
.stderr(predicates::str::is_match(r##"Nested_Chapter::Rustdoc_include_works_with_anchors_too \(line \d+\) ... FAILED"##).unwrap());
3434
}
35+
36+
#[test]
37+
fn empty_cli() {
38+
let mut cmd = mdbook_cmd();
39+
cmd.assert()
40+
.failure()
41+
.code(2)
42+
.stdout(predicates::str::is_empty())
43+
.stderr(predicates::str::contains(
44+
"Creates a book from markdown files",
45+
));
46+
}

0 commit comments

Comments
 (0)