X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fgit-codeowners;a=blobdiff_plain;f=t%2Fapp-codeowners.t;h=28309d3861ca0b802cf938133128494302850377;hp=e3a1e2ea9afae009084ee1143eaf8f965dce2368;hb=3c7ed3d762399efb2d01121392f7115104095788;hpb=26eed33eb4aa577d9347e5ebaf577b3e3a2c0396 diff --git a/t/app-codeowners.t b/t/app-codeowners.t index e3a1e2e..28309d3 100644 --- a/t/app-codeowners.t +++ b/t/app-codeowners.t @@ -65,7 +65,7 @@ END subtest 'format json' => sub { plan skip_all => 'No JSON::MaybeXS' if !eval { require JSON::MaybeXS }; - ($stdout, $stderr, $exit) = run { App::Codeowners->main(qw{-f json show --no-project}) }; + ($stdout, $stderr, $exit) = run { App::Codeowners->main(qw{-f json show --no-projects}) }; is($exit, 0, 'exited without error'); my $expect = '[{"File":"CODEOWNERS","Owner":null},{"File":"a/b/c/bar.txt","Owner":["@snickers"]},{"File":"foo.txt","Owner":["@twix"]}]'; is($stdout, $expect, 'correct output with json format'); @@ -76,7 +76,8 @@ done_testing; exit; sub _can_git { - my (undef, $version) = run_git('--version'); + my (undef, $version) = eval { run_git('--version') }; + note $@ if $@; note "Found: $version" if $version; return $version && $version ge 'git version 1.8.5'; # for -C flag }