App-Codeowners
view release on metacpan or search on metacpan
t/app-codeowners.t view on Meta::CPAN
use Path::Tiny 0.089 qw(path tempdir);
use Test::More;
my $can_git = _can_git();
# Set progname so that pod2usage knows how to find the script after we chdir.
$0 = path($Bin)->parent->child('bin/git-codeowners')->absolute->stringify;
$ENV{NO_COLOR} = 1;
sub run(&) { ## no critic (Subroutines::ProhibitSubroutinePrototypes)
my $code = shift;
capture { exit_code { $code->() } };
}
subtest 'basic options' => sub {
my ($stdout, $stderr, $exit) = run { App::Codeowners->main('--help') };
is($exit, 0, 'exited 0 when --help');
like($stdout, qr/Usage:/, 'correct --help output') or diag $stdout;
($stdout, $stderr, $exit) = run { App::Codeowners->main('--version') };
( run in 0.476 second using v1.01-cache-2.11-cpan-49f99fa48dc )