]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/git.t
import: check for git->qx errors, clearer return values
[public-inbox.git] / t / git.t
diff --git a/t/git.t b/t/git.t
index dcd053c569429efc5a91a86857ee932ee938da82..2cfff248a01e6f51a3d838c01e9d17c3cff793a1 100644 (file)
--- a/t/git.t
+++ b/t/git.t
@@ -76,13 +76,17 @@ if (1) {
        is(length($$x), $size, 'read correct number of bytes');
 
        my $ref = $gcf->qx(qw(cat-file blob), $buf);
+       is($?, 0, 'no error on scalar success');
        my @ref = $gcf->qx(qw(cat-file blob), $buf);
+       is($?, 0, 'no error on wantarray success');
        my $nl = scalar @ref;
        ok($nl > 1, "qx returned array length of $nl");
        is(join('', @ref), $ref, 'qx array and scalar context both work');
 
        $gcf->qx(qw(repack -adq));
        ok($gcf->packed_bytes > 0, 'packed size is positive');
+       $gcf->qx(qw(rev-parse --verify bogus));
+       isnt($?, 0, '$? set on failure'.$?);
 }
 
 SKIP: {