]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/html_index.t
update copyright headers and email addresses
[public-inbox.git] / t / html_index.t
index 80a8899778b57198eb1b46fcbe3651c258aea59b..50f5ae5eeffc9628e7e31bba283f11de67ea599d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2014, Eric Wong <normalperson@yhbt.net> and all contributors
+# Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
 use strict;
 use warnings;
@@ -22,9 +22,9 @@ my $git_dir = "$tmpdir/gittest";
                        exec("ssoma-mda", $git_dir);
                }
                my $mid = "<$i\@example.com>";
-               my $mid_line = "Message-ID: $mid\n";
+               my $mid_line = "Message-ID: $mid";
                if ($prev) {
-                       $mid_line .= "In-Reply-To: $prev\n";
+                       $mid_line .= "In-Reply-To: $prev";
                }
                $prev = $mid;
                my $simple = Email::Simple->new(<<EOF);
@@ -50,11 +50,13 @@ EOF
 
 # check HTML index
 {
-       my $feed = PublicInbox::Feed->generate_html_index({
+       use IO::File;
+       my $cb = PublicInbox::Feed::generate_html_index({
                git_dir => $git_dir,
                max => 3
        });
-       like($feed, qr/html/, "feed is valid HTML :)");
+       require 't/common.perl';
+       like(stream_to_string($cb), qr/html/, "feed is valid HTML :)");
 }
 
 done_testing();