]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/view.t
view: msg_html uses getline body to reduce latency
[public-inbox.git] / t / view.t
index 3332fb48b14bb82eaf01220a98b79743479c1668..6c0859915e89c9ae2d1384d69c2bd35a5c8d5ed0 100644 (file)
--- a/t/view.t
+++ b/t/view.t
@@ -9,7 +9,13 @@ use PublicInbox::View;
 sub msg_html ($) {
        my ($mime) = @_;
 
-       PublicInbox::View::msg_html(undef, $mime);
+       my $s = '';
+       my $body = PublicInbox::View::msg_html(undef, $mime);
+       while (defined(my $buf = $body->getline)) {
+               $s .= $buf;
+       }
+       $body->close;
+       $s;
 }
 
 # plain text