]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/git.t
git: synchronous cat_file may return type and OID
[public-inbox.git] / t / git.t
diff --git a/t/git.t b/t/git.t
index 377652ca8b5b7afb381774128e25eba2fb46ae75..0c85e492db00be62f5d56dedefb8abbc951c4e78 100644 (file)
--- a/t/git.t
+++ b/t/git.t
@@ -70,10 +70,10 @@ if (1) {
        chomp $buf;
 
        my $gcf = PublicInbox::Git->new($dir);
-       my $rsize;
-       my $x = $gcf->cat_file($buf, \$rsize);
-       is($rsize, $size, 'got correct size ref on big file');
-       is(length($$x), $size, 'read correct number of bytes');
+       my @x = $gcf->cat_file($buf);
+       is($x[2], 'blob', 'got blob on wantarray');
+       is($x[3], $size, 'got correct size ref on big file');
+       is(length(${$x[0]}), $size, 'read correct number of bytes');
 
        my $ref = $gcf->qx(qw(cat-file blob), $buf);
        is($?, 0, 'no error on scalar success');