From: Vincent Pit Date: Tue, 7 Oct 2008 20:15:33 +0000 (+0200) Subject: Test that 'rgit gui' acts as Once X-Git-Tag: v0.04~7 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=11ce663f56d70cbc0373c27c6dbe146823106e90;p=perl%2Fmodules%2Frgit.git Test that 'rgit gui' acts as Once --- diff --git a/t/21-once.t b/t/21-once.t index 410496c..4e0c4ac 100644 --- a/t/21-once.t +++ b/t/21-once.t @@ -6,22 +6,24 @@ use warnings; 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");