use crate::prelude::*;
use snapbox::file;
#[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"]);
});
}
#[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![[""]]);
});
}