1use strict; 2use Test::More; 3use xt::CLI; 4 5{ 6 my $app = cli(); 7 $app->run("help"); 8 like $app->stdout, qr/Carton - Perl module/; 9 10 $app->run("-h"); 11 like $app->stdout, qr/Carton - Perl module/; 12 13 $app->run("help", "install"); 14 like $app->stdout, qr/Install the dependencies/; 15 16 $app->run("install", "-h"); 17 like $app->stdout, qr/Install the dependencies/; 18 19 $app->run("help", "foobarbaz"); 20 is $app->stdout, ''; 21 like $app->stderr, qr/No documentation found/; 22} 23 24done_testing; 25 26