diff options
author | Eric Wong <e@yhbt.net> | 2020-06-20 00:13:02 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-06-21 17:31:44 +0000 |
commit | 7d626338a6bf02c1098ba16302f5c13be0370673 (patch) | |
tree | 4ef6603a3f82e196f45c07ea06e37dd00c839acf /t | |
parent | 476f054f21ee64a08418cacb23b5a48c68858441 (diff) | |
download | public-inbox-7d626338a6bf02c1098ba16302f5c13be0370673.tar.gz |
We also need to check for git 2.6 earlier in each test case, before any other TAP output is emitted to avoid confusing the TAP consumers.
Diffstat (limited to 't')
-rw-r--r-- | t/git.t | 3 | ||||
-rw-r--r-- | t/imap.t | 2 | ||||
-rw-r--r-- | t/imapd.t | 2 | ||||
-rw-r--r-- | t/inbox_idle.t | 2 | ||||
-rw-r--r-- | t/psgi_bad_mids.t | 1 | ||||
-rw-r--r-- | t/psgi_multipart_not.t | 1 | ||||
-rw-r--r-- | t/psgi_scan_all.t | 1 |
7 files changed, 8 insertions, 4 deletions
@@ -84,7 +84,8 @@ if (1) { ok($gcf->packed_bytes > 0, 'packed size is positive'); } -if ('alternates reloaded') { +SKIP: { + require_git(2.6, 7) or skip('need git 2.6+ for --batch-all-objects', 7); my ($alt, $alt_obj) = tmpdir(); my $hash_obj = [ 'git', "--git-dir=$alt", qw(hash-object -w --stdin) ]; PublicInbox::Import::init_bare($alt); @@ -5,11 +5,11 @@ use strict; use Test::More; use PublicInbox::TestCommon; +require_git 2.6; require_mods(qw(DBD::SQLite Email::Address::XS||Mail::Address Parse::RecDescent)); require_ok 'PublicInbox::IMAP'; require_ok 'PublicInbox::IMAPD'; -require_git 2.6; my ($tmpdir, $for_destroy) = tmpdir(); my $cfgfile = "$tmpdir/config"; @@ -105,7 +105,7 @@ my @orig_list = @raw = $mic->list; like($raw[0], qr/^\* LIST \(.*?\) "\." INBOX/, 'got an inbox'); like($raw[-1], qr/^\S+ OK /, 'response ended with OK'); -is(scalar(@raw), scalar(@V) + 4, 'default LIST response'); +is(scalar(@raw), scalar(@V) * 2 + 2, 'default LIST response'); @raw = $mic->list('', 'inbox.i1'); is(scalar(@raw), 2, 'limited LIST response'); like($raw[0], qr/^\* LIST \(.*?\) "\." INBOX/, diff --git a/t/inbox_idle.t b/t/inbox_idle.t index 6bd56113..f754e0fc 100644 --- a/t/inbox_idle.t +++ b/t/inbox_idle.t @@ -4,10 +4,10 @@ use Test::More; use PublicInbox::TestCommon; use PublicInbox::Config; +require_git 2.6; require_mods(qw(DBD::SQLite)); require PublicInbox::SearchIdx; use_ok 'PublicInbox::InboxIdle'; -require_git('2.6'); use PublicInbox::InboxWritable; my ($tmpdir, $for_destroy) = tmpdir(); diff --git a/t/psgi_bad_mids.t b/t/psgi_bad_mids.t index 81bd9356..70393573 100644 --- a/t/psgi_bad_mids.t +++ b/t/psgi_bad_mids.t @@ -8,6 +8,7 @@ use PublicInbox::Config; use PublicInbox::TestCommon; my @mods = qw(DBD::SQLite HTTP::Request::Common Plack::Test URI::Escape Plack::Builder PublicInbox::WWW); +require_git 2.6; require_mods(@mods); use_ok($_) for @mods; use_ok 'PublicInbox::WWW'; diff --git a/t/psgi_multipart_not.t b/t/psgi_multipart_not.t index e36820f4..9b7fb4d0 100644 --- a/t/psgi_multipart_not.t +++ b/t/psgi_multipart_not.t @@ -6,6 +6,7 @@ use Test::More; use PublicInbox::Eml; use PublicInbox::Config; use PublicInbox::TestCommon; +require_git 2.6; my @mods = qw(DBD::SQLite Search::Xapian HTTP::Request::Common Plack::Test URI::Escape Plack::Builder Plack::Test); require_mods(@mods); diff --git a/t/psgi_scan_all.t b/t/psgi_scan_all.t index 46eb489f..c8cb2409 100644 --- a/t/psgi_scan_all.t +++ b/t/psgi_scan_all.t @@ -7,6 +7,7 @@ use PublicInbox::Eml; use PublicInbox::Config; use PublicInbox::TestCommon; my @mods = qw(HTTP::Request::Common Plack::Test URI::Escape DBD::SQLite); +require_git 2.6; require_mods(@mods); use_ok 'PublicInbox::V2Writable'; foreach my $mod (@mods) { use_ok $mod; } |