]> Dogcows Code - chaz/git-codeowners/blobdiff - t/app-codeowners.t
add projects command and filtering to show command
[chaz/git-codeowners] / t / app-codeowners.t
index e3a1e2ea9afae009084ee1143eaf8f965dce2368..28309d3861ca0b802cf938133128494302850377 100644 (file)
@@ -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
 }
This page took 0.020726 seconds and 4 git commands to generate.