summaryrefslogtreecommitdiff
path: root/xt/cli/help.t
diff options
context:
space:
mode:
Diffstat (limited to 'xt/cli/help.t')
-rw-r--r--xt/cli/help.t25
1 files changed, 25 insertions, 0 deletions
diff --git a/xt/cli/help.t b/xt/cli/help.t
new file mode 100644
index 0000000..0ad0896
--- /dev/null
+++ b/xt/cli/help.t
@@ -0,0 +1,25 @@
+use strict;
+use Test::More;
+use xt::CLI;
+
+{
+ my $app = cli();
+ $app->run("help");
+ like $app->stdout, qr/Carton - Perl module/;
+
+ $app->run("-h");
+ like $app->stdout, qr/Carton - Perl module/;
+
+ $app->run("help", "install");
+ like $app->stdout, qr/Install the dependencies/;
+
+ $app->run("install", "-h");
+ like $app->stdout, qr/Install the dependencies/;
+
+ $app->run("help", "foobarbaz");
+ is $app->stdout, '';
+ like $app->stderr, qr/No documentation found/;
+}
+
+done_testing;
+