about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-05 21:24:17 +0000
committerEric Wong <e@80x24.org>2016-06-05 21:39:27 +0000
commit1365e185d817cdc2de04968c37f597d92226a13b (patch)
tree9b3785bc759e561804ae65b06217478c3e7a2bf0 /t
parente1d60f92dffc9830618aa0b49f3f829e99cb5353 (diff)
downloadpublic-inbox-1365e185d817cdc2de04968c37f597d92226a13b.tar.gz
This should reduce link following for replies and improve
visibility.  This should also reduce cache overhead/footprint
for crawlers.
Diffstat (limited to 't')
-rw-r--r--t/view.t14
1 files changed, 10 insertions, 4 deletions
diff --git a/t/view.t b/t/view.t
index a70c52d8..3332fb48 100644
--- a/t/view.t
+++ b/t/view.t
@@ -6,6 +6,12 @@ use Test::More;
 use Email::MIME;
 use PublicInbox::View;
 
+sub msg_html ($) {
+        my ($mime) = @_;
+
+        PublicInbox::View::msg_html(undef, $mime);
+}
+
 # plain text
 {
         my $body = <<EOF;
@@ -41,7 +47,7 @@ EOF
                 body => $body,
         )->as_string;
         my $mime = Email::MIME->new($s);
-        my $html = PublicInbox::View::msg_html(undef, $mime);
+        my $html = msg_html($mime);
 
         # ghetto tests
         like($html, qr!<a\nhref="raw"!s, "raw link present");
@@ -71,7 +77,7 @@ EOF
                 parts => $parts,
         );
 
-        my $html = PublicInbox::View::msg_html(undef, $mime);
+        my $html = msg_html($mime);
         like($html, qr/hi\n.*-- Attachment #2.*\nbye\n/s, "multipart split");
 }
 
@@ -100,7 +106,7 @@ EOF
                 parts => $parts,
         );
 
-        my $html = PublicInbox::View::msg_html(undef, $mime);
+        my $html = msg_html($mime);
         like($html, qr!.*Attachment #2: foo\.patch --!,
                 "parts split with filename");
 }
@@ -126,7 +132,7 @@ EOF
         );
 
         my $orig = $mime->body_raw;
-        my $html = PublicInbox::View::msg_html(undef, $mime);
+        my $html = msg_html($mime);
         like($orig, qr/hi =3D bye=/, "our test used QP correctly");
         like($html, qr/\bhi = bye\b/, "HTML output decoded QP");
 }