about summary refs log tree commit homepage
path: root/t/git.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-29 12:42:58 +0500
committerEric Wong <e@80x24.org>2021-01-30 01:08:20 +0000
commitd679cbb1b5ad95d2689bc3b8f78da2b380fc7860 (patch)
treee535b8117a639b55a5e57c6fae8f14977ea367ee /t/git.t
parent401803a9e717ba05c8a73f9bf60d1175b316bb77 (diff)
downloadpublic-inbox-d679cbb1b5ad95d2689bc3b8f78da2b380fc7860.tar.gz
Instead of forcing callers to set a variable to write into,
we'll just rely on wantarray.
Diffstat (limited to 't/git.t')
-rw-r--r--t/git.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/git.t b/t/git.t
index 377652ca..0c85e492 100644
--- 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');