]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/git.t
Merge tag 'v1.6.1' into eidx
[public-inbox.git] / t / git.t
diff --git a/t/git.t b/t/git.t
index 228df90fa45861ef0e87444ea5a057a4389e40e7..2cfff248a01e6f51a3d838c01e9d17c3cff793a1 100644 (file)
--- a/t/git.t
+++ b/t/git.t
@@ -76,15 +76,21 @@ 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'.$?);
 }
 
-if ('alternates reloaded') {
+SKIP: {
+       require_git(2.6, 7) or skip('need git 2.6+ for --batch-all-objects', 7);
        my ($alt, $alt_obj) = tmpdir();
        my $hash_obj = [ 'git', "--git-dir=$alt", qw(hash-object -w --stdin) ];
        PublicInbox::Import::init_bare($alt);