X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fgit.t;h=dfa5eab21f41a2e07805088bcc1bdc4120a29ca6;hb=1d88b8639596a549dd972e113b52f9c2d035d529;hp=08b4a9182f60832794292d1aed572fa1741323a3;hpb=7b7d4bd01b564969eb0c1904a5bd9ee4f3dbba72;p=public-inbox.git
diff --git a/t/git.t b/t/git.t
index 08b4a918..dfa5eab2 100644
--- a/t/git.t
+++ b/t/git.t
@@ -1,7 +1,8 @@
-# Copyright (C) 2015-2021 all contributors
+#!perl -w
+# Copyright (C) all contributors
# License: AGPL-3.0+
use strict;
-use Test::More;
+use v5.10.1;
use PublicInbox::TestCommon;
my ($dir, $for_destroy) = tmpdir();
use PublicInbox::Import;
@@ -9,7 +10,7 @@ use POSIX qw(strftime);
use PublicInbox::Git;
{
- PublicInbox::Import::init_bare($dir);
+ PublicInbox::Import::init_bare($dir, 'master');
my $fi_data = './t/git.fast-import-data';
open my $fh, '<', $fi_data or die
"fast-import data readable (or run test at top level: $!";
@@ -44,7 +45,7 @@ use PublicInbox::Git;
my $f = 'HEAD:foo.txt';
my @x = $gcf->check($f);
is(scalar @x, 3, 'returned 3 element array for existing file');
- like($x[0], qr/\A[a-f0-9]{40}\z/, 'returns obj ID in 1st element');
+ like($x[0], qr/\A[a-f0-9]{40,64}\z/, 'returns obj ID in 1st element');
is('blob', $x[1], 'returns obj type in 2nd element');
like($x[2], qr/\A\d+\z/, 'returns obj size in 3rd element');
@@ -134,7 +135,7 @@ if (1) {
}
SKIP: {
- require_git(2.6, 7) or skip('need git 2.6+ for --batch-all-objects', 7);
+ require_git(2.6, 7);
my ($alt, $alt_obj) = tmpdir();
my $hash_obj = [ 'git', "--git-dir=$alt", qw(hash-object -w --stdin) ];
PublicInbox::Import::init_bare($alt);