X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=t%2Fhtml_index.t;h=73311f6526f61b2a9bf36860a80826f2686404af;hp=6286fc479e874e135a303bdd9d684140e52faaf2;hb=1761fba7befab2681276ac8f123593610ad27e58;hpb=797ba8046562864a09ed36e6040055babb536615 diff --git a/t/html_index.t b/t/html_index.t index 6286fc47..73311f65 100644 --- a/t/html_index.t +++ b/t/html_index.t @@ -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();