X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F20-each.t;h=ea70268904f03bc49d9881b9eb82876e16bcf728;hb=dc668e3c302569ed2b5eb2ed893247308f22528a;hp=5c337e7e8637244a4df177da9b9b039d04caf8c0;hpb=edfd59020168422fe2c1baa014f0925968a77c9a;p=perl%2Fmodules%2Frgit.git diff --git a/t/20-each.t b/t/20-each.t index 5c337e7..ea70268 100644 --- a/t/20-each.t +++ b/t/20-each.t @@ -12,6 +12,10 @@ use Test::More tests => 2 + 2 * 4 + 12 * (3 + 1 + 3 + 6); use App::Rgit::Utils qw/:codes/; use App::Rgit; +use lib 't/lib'; + +use App::Rgit::Policy::Callback; + sub build { my ($tree, $prefix) = @_; my @ret; @@ -93,8 +97,12 @@ is(grep({ ref eq 'ARRAY' } @expected), 3, 'all of them are array references'); ], @expected; sub try { - my ($cmd, $exp, $policy) = @_; + my ($cmd, $exp) = @_; my ($fh, $filename) = tempfile(UNLINK => 1); + my $policy = App::Rgit::Policy->new( + @_ > 2 ? (name => 'Callback', callback => $_[2]) + : (name => 'Default') + ); my $ar = App::Rgit->new( git => abs_path('t/bin/git'), root => $tmpdir,