comments.t: Assert that comments get permalink metadata

Signed-off-by: Simon McVittie <smcv@debian.org>
master
Simon McVittie 2019-02-03 16:06:36 +00:00
parent 4ac930380b
commit 278678b42f
2 changed files with 15 additions and 1 deletions

View File

@ -68,6 +68,18 @@ sub slurp {
my $content = slurp("t/tmp/out/post/index.html");
ok(defined $content);
ok($content =~ m/I conquered.*I explored.*I landed/s);
like($content, qr/I conquered.*I explored.*I landed/s);
$content = slurp("t/tmp/out/post/index.atom");
ok(defined $content);
like($content, qr{
<link\s*href="http://example\.com/post/[#]comment-[[:xdigit:]]+"
.*
<link\s*href="http://example\.com/post/[#]comment-[[:xdigit:]]+"
.*
<link\s*href="http://example\.com/post/[#]comment-[[:xdigit:]]+"
}sx, 'Each comment gets an appropriate permalink in <link>');
unlike($content, qr{<link\s*href=.*/post/comment_[123]/});
unlike($content, qr{<link\s*href=.*/post/comment_[123]_[[:xdigit:]]+/});
done_testing();

View File

@ -1 +1,3 @@
only post
[[!inline pages="internal(post/comment_*)" atom="yes" rss="no" feedonly="yes"]]