1 # Copyright (C) 2014-2020 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
9 use PublicInbox::Import;
10 use PublicInbox::Inbox;
11 use PublicInbox::TestCommon;
12 my ($tmpdir, $for_destroy) = tmpdir();
13 my $git_dir = "$tmpdir/gittest";
14 my $ibx = PublicInbox::Inbox->new({
15 address => 'test@example',
18 url => 'http://example.com/test',
21 my $im = PublicInbox::Import->new($git, 'tester', 'test@example');
25 is(0, system(qw(git init -q --bare), $git_dir), "git init");
28 foreach my $i (1..6) {
29 my $mid = "<$i\@example.com>";
30 my $mid_line = "Message-ID: $mid";
32 $mid_line .= "In-Reply-To: $prev";
35 my $mime = Email::MIME->new(<<EOF);
36 From: ME <me\@example.com>
37 To: U <u\@example.com>
40 Date: Thu, 01 Jan 1970 00:00:00 +0000
42 > This is a long multi line quote so it should not be allowed to
43 > show up in its entirty in the Atom feed. drop me
47 > inline me here, short quote
51 like($im->add($mime), qr/\A:\d+\z/, 'inserted message');