about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-12 04:46:38 +0000
committerEric Wong <e@80x24.org>2016-06-13 21:43:02 +0000
commit31afda256c813443062e0504213d41732e50ee45 (patch)
treeebc5eae99de8fd19fcd051f4b18fea4dbfb1c2a9 /t
parent9dc61f9132a7c4ac4a4d067cdd48efb7c28de102 (diff)
downloadpublic-inbox-31afda256c813443062e0504213d41732e50ee45.tar.gz
We need to ensure we show the message body ASAP since
the thread generation via Xapian could take a while
and maybe even raise an exception or crash.
Diffstat (limited to 't')
-rw-r--r--t/view.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/view.t b/t/view.t
index 3332fb48..6c085991 100644
--- 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