diff options
-rwxr-xr-x | t/comments.t | 14 | ||||
-rw-r--r-- | t/tinyblog/post.mdwn | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/t/comments.t b/t/comments.t index 9bc40b66a..fc87d72ff 100755 --- a/t/comments.t +++ b/t/comments.t @@ -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(); diff --git a/t/tinyblog/post.mdwn b/t/tinyblog/post.mdwn index 9eaeec7ef..993155b45 100644 --- a/t/tinyblog/post.mdwn +++ b/t/tinyblog/post.mdwn @@ -1 +1,3 @@ only post + +[[!inline pages="internal(post/comment_*)" atom="yes" rss="no" feedonly="yes"]] |