X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Findex-git-times.t;h=52173396b1eaa78074d6bbd13ac1f80985d84ea6;hb=refs%2Fheads%2Fmaster;hp=9b869f948675bf87157924c117b7b3352644d00a;hpb=9c7737d056f832824812086373a13922dd08a0c5;p=public-inbox.git diff --git a/t/index-git-times.t b/t/index-git-times.t index 9b869f94..ffe9223c 100644 --- a/t/index-git-times.t +++ b/t/index-git-times.t @@ -1,12 +1,12 @@ #!perl -w -# Copyright (C) 2020 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ use strict; use v5.10.1; -use Test::More; use PublicInbox::TestCommon; use PublicInbox::Config; use PublicInbox::Admin; +use PublicInbox::Import; use File::Path qw(remove_tree); require_mods(qw(DBD::SQLite Search::Xapian)); @@ -16,27 +16,28 @@ my ($tmpdir, $for_destroy) = tmpdir(); local $ENV{PI_CONFIG} = "$tmpdir/cfg"; my $v1dir = "$tmpdir/v1"; my $addr = 'x@example.com'; +my $default_branch = PublicInbox::Import::default_branch; run_script(['-init', '--indexlevel=medium', 'v1', $v1dir, 'http://example.com/x', $addr]) or die "init failed"; { - my $data = <<'EOF'; + my $data = <<"EOF"; blob mark :1 data 133 -From: timeless -To: x +From: timeless +To: x Subject: can I haz the time? -Message-ID: <19700101000000-1234@example.com> +Message-ID: <19700101000000-1234\@example.com> plz -reset refs/heads/master -commit refs/heads/master +reset $default_branch +commit $default_branch mark :2 -author timeless 749520000 +0100 -committer x 1285977600 -0100 +author timeless 749520000 +0100 +committer x 1285977600 -0100 data 20 can I haz the time? M 100644 :1 53/256f6177504c2878d3a302ef5090dacf5e752c @@ -72,7 +73,7 @@ my $smsg; is($res->[0]->{ds}, $smsg->{ds}, 'Xapian search on datestamp'); } SKIP: { - require_git(2.6, 1) or skip('git 2.6+ required for v2', 10); + require_git(2.6, 10); my $v2dir = "$tmpdir/v2"; run_script(['-convert', $v1dir, $v2dir]) or die 'v2 conversion failed';