1 # Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
2 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
9 use PublicInbox::Import;
10 use File::Temp qw/tempdir/;
11 my $tmpdir = tempdir('pi-http-XXXXXX', TMPDIR => 1, CLEANUP => 1);
12 my $git_dir = "$tmpdir/gittest";
13 my $git = PublicInbox::Git->new($git_dir);
14 my $im = PublicInbox::Import->new($git, 'tester', 'test@example');
18 is(0, system(qw(git init -q --bare), $git_dir), "git init");
21 foreach my $i (1..6) {
22 # my $pid = open(my $pipe, "|-");
23 # defined $pid or die "fork/pipe failed: $!\n";
25 # exec("ssoma-mda", $git_dir);
27 my $mid = "<$i\@example.com>";
28 my $mid_line = "Message-ID: $mid";
30 $mid_line .= "In-Reply-To: $prev";
33 my $mime = Email::MIME->new(<<EOF);
34 From: ME <me\@example.com>
35 To: U <u\@example.com>
38 Date: Thu, 01 Jan 1970 00:00:00 +0000
40 > This is a long multi line quote so it should not be allowed to
41 > show up in its entirty in the Atom feed. drop me
45 > inline me here, short quote
49 like($im->add($mime), qr/\A:\d+\z/, 'inserted message');
57 my $cb = PublicInbox::Feed::generate_html_index({
61 require 't/common.perl';
62 like(stream_to_string($cb), qr/html/, "feed is valid HTML :)");