body => $body,
);
$s = Email::MIME->new($s->as_string);
- my $html = PublicInbox::View->as_html($s);
+ my $html = PublicInbox::View->msg_html($s);
- # ghetto
- like($html, qr/<a href="hello%40/s, "MID link present");
+ # ghetto tests
+ like($html, qr!<a href="\.\./m/hello%40!s, "MID link present");
like($html, qr/hello world\b/, "body present");
like($html, qr/> keep this inline/, "short quoted text is inline");
like($html, qr/<a name=[^>]+>> Long and wordy/,
# short page
my $pfx = "http://example.com/test/f";
- my $short = PublicInbox::View->as_html($s, $pfx);
+ my $short = PublicInbox::View->msg_html($s, $pfx);
+ like($short, qr!<a href="hello%40!s, "MID link present");
like($short, qr/\n> keep this inline/,
"short quoted text is inline");
like($short, qr/<a href="\Q$pfx\E#[^>]+>Long and wordy/,
parts => $parts,
);
- my $html = PublicInbox::View->as_html($mime);
+ my $html = PublicInbox::View->msg_html($mime);
like($html, qr/hi\n-+ part #2 -+\nbye\n/, "multipart split");
}
parts => $parts,
);
- my $html = PublicInbox::View->as_html($mime);
+ my $html = PublicInbox::View->msg_html($mime);
like($html, qr!see attached patch\n-+ foo\.patch -+\n--- a/file\n!,
"parts split with filename");
}