use Cwd qw/abs_path/;
use File::Temp qw/tempfile/;
-use Test::More tests => 8 * 4;
+use Test::More tests => 9 * 5;
use App::Rgit;
my @expected = (
- ([ [ qw/^n ^g ^w ^b ^^/ ] ]) x 4
+ ([ [ qw/^n ^g ^w ^b ^^/ ] ]) x 5
);
-for my $cmd (qw/version help daemon init/) {
+for my $cmd (qw/daemon gui help init version/) {
my ($fh, $filename) = tempfile(UNLINK => 1);
- my $exit = App::Rgit->new(
+ my $ar = App::Rgit->new(
git => abs_path('t/bin/git'),
root => 't',
cmd => $cmd,
args => [ abs_path($filename), $cmd, qw/^n ^g ^w ^b ^^/ ]
- )->run;
+ );
+ isnt($ar, undef, "once $cmd has a defined object");
+ my $exit = $ar->run;
is($exit, 0, "once $cmd returned 0");
my @lines = sort split /\n/, do { local $/; <$fh> };
is(@lines, 1, "once $cmd visited only one repo");