]> 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 6286fc479e874e135a303bdd9d684140e52faaf2..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;
@@ -55,18 +55,8 @@ EOF
                git_dir => $git_dir,
                max => 3
        });
-       my $headers;
-       my $io = IO::File->new_tmpfile;
-       use POSIX qw/dup/;
-       my $dup = dup($io->fileno);
-       my $response = sub { $headers = \@_, $io };
-       $cb->($response);
-       $io = IO::File->new;
-       $io->fdopen($dup, 'r+');
-       $io->seek(0, 0);
-       $io->read(my $feed, 666666);
-       like($feed, qr/html/, "feed is valid HTML :)");
-       $io->close;
+       require 't/common.perl';
+       like(stream_to_string($cb), qr/html/, "feed is valid HTML :)");
 }
 
 done_testing();