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)
8 use File::Temp qw/tempdir/;
9 my $tmpdir = tempdir(CLEANUP => 1);
10 my $git_dir = "$tmpdir/gittest";
14 is(0, system(qw(git init -q --bare), $git_dir), "git init");
17 foreach my $i (1..6) {
18 local $ENV{GIT_DIR} = $git_dir;
19 my $pid = open(my $pipe, "|-");
20 defined $pid or die "fork/pipe failed: $!\n";
22 exec("ssoma-mda", $git_dir);
24 my $mid = "<$i\@example.com>";
25 my $mid_line = "Message-ID: $mid";
27 $mid_line .= "In-Reply-To: $prev";
30 my $simple = Email::Simple->new(<<EOF);
31 From: ME <me\@example.com>
32 To: U <u\@example.com>
35 Date: Thu, 01 Jan 1970 00:00:00 +0000
37 > This is a long multi line quote so it should not be allowed to
38 > show up in its entirty in the Atom feed. drop me
42 > inline me here, short quote
46 print $pipe $simple->as_string or die "print failed: $!\n";
47 close $pipe or die "close pipe failed: $!\n";
54 my $cb = PublicInbox::Feed::generate_html_index({
58 require 't/common.perl';
59 like(stream_to_string($cb), qr/html/, "feed is valid HTML :)");