diff options
author | Eric Wong <e@80x24.org> | 2021-01-29 12:42:58 +0500 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-30 01:08:20 +0000 |
commit | d679cbb1b5ad95d2689bc3b8f78da2b380fc7860 (patch) | |
tree | e535b8117a639b55a5e57c6fae8f14977ea367ee /t/git.t | |
parent | 401803a9e717ba05c8a73f9bf60d1175b316bb77 (diff) | |
download | public-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.t | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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'); |