diff --git a/tests/cli/test.rs b/tests/cli/test.rs
index 56e0f159..63114d3a 100644
--- a/tests/cli/test.rs
+++ b/tests/cli/test.rs
@@ -32,15 +32,3 @@ 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",
- ));
-}
diff --git a/tests/testsuite/cli.rs b/tests/testsuite/cli.rs
new file mode 100644
index 00000000..caa59752
--- /dev/null
+++ b/tests/testsuite/cli.rs
@@ -0,0 +1,36 @@
+//! Basic tests for mdbook's CLI.
+
+use crate::prelude::*;
+use snapbox::file;
+
+// Test with no args.
+#[test]
+#[cfg_attr(
+ not(all(feature = "watch", feature = "serve")),
+ ignore = "needs all features"
+)]
+fn no_args() {
+ BookTest::empty().run("", |cmd| {
+ cmd.expect_code(2)
+ .expect_stdout(str![[""]])
+ .expect_stderr(file!["cli/no_args.term.svg"]);
+ });
+}
+
+// Help command.
+#[test]
+#[cfg_attr(
+ not(all(feature = "watch", feature = "serve")),
+ ignore = "needs all features"
+)]
+fn help() {
+ BookTest::empty()
+ .run("help", |cmd| {
+ cmd.expect_stdout(file!["cli/help.term.svg"])
+ .expect_stderr(str![[""]]);
+ })
+ .run("--help", |cmd| {
+ cmd.expect_stdout(file!["cli/help.term.svg"])
+ .expect_stderr(str![[""]]);
+ });
+}
diff --git a/tests/testsuite/cli/help.term.svg b/tests/testsuite/cli/help.term.svg
new file mode 100644
index 00000000..e27fa313
--- /dev/null
+++ b/tests/testsuite/cli/help.term.svg
@@ -0,0 +1,63 @@
+
diff --git a/tests/testsuite/cli/no_args.term.svg b/tests/testsuite/cli/no_args.term.svg
new file mode 100644
index 00000000..e27fa313
--- /dev/null
+++ b/tests/testsuite/cli/no_args.term.svg
@@ -0,0 +1,63 @@
+
diff --git a/tests/testsuite/main.rs b/tests/testsuite/main.rs
index 11cd9a81..c8630267 100644
--- a/tests/testsuite/main.rs
+++ b/tests/testsuite/main.rs
@@ -4,6 +4,7 @@
mod book_test;
mod build;
+mod cli;
mod prelude {
pub use crate::book_test::BookTest;