X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fimport.t;h=ae76858ba2ab7827bc7aaa1d45db377a0954ee64;hb=refs%2Fheads%2Fmaster;hp=4ba740224aa9f1f4e025ab1f9e8bb7eda3e223ec;hpb=f4f8acc91796060dbf680198201f9a82d8fe6c88;p=public-inbox.git
diff --git a/t/import.t b/t/import.t
index 4ba74022..f1d61dae 100644
--- a/t/import.t
+++ b/t/import.t
@@ -1,8 +1,8 @@
+#!perl -w
# Copyright (C) all contributors
# License: AGPL-3.0+
+use v5.10.1;
use strict;
-use warnings;
-use Test::More;
use PublicInbox::Eml;
use PublicInbox::Smsg;
use PublicInbox::Git;
@@ -26,10 +26,11 @@ hello world
EOF
my $v2 = require_git(2.6, 1);
-my $smsg = bless {}, 'PublicInbox::Smsg' if $v2;
+my $smsg = $v2 ? bless({}, 'PublicInbox::Smsg') : undef;
like($im->add($mime, undef, $smsg), qr/\A:[0-9]+\z/, 'added one message');
-if ($v2) {
+SKIP: {
+ skip 'git 2.6+ required', 3 if !$v2;
like($smsg->{blob}, qr/\A[a-f0-9]{40,64}\z/, 'got last object_id');
my @cmd = ('git', "--git-dir=$git->{git_dir}", qw(hash-object --stdin));
open my $in, '+<', undef or BAIL_OUT "open(+<): $!";