From: Simon McVittie Date: Sat, 4 Jun 2011 15:55:24 +0000 (+0100) Subject: comments: add regression test for sorting by date X-Git-Tag: 3.20110707~16^2 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/94268a46cd30fc72b51714e42e9db741eb29cc73 comments: add regression test for sorting by date --- diff --git a/t/comments.t b/t/comments.t new file mode 100755 index 000000000..4721d7a9c --- /dev/null +++ b/t/comments.t @@ -0,0 +1,57 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Test::More 'no_plan'; +use IkiWiki; + +ok(! system("rm -rf t/tmp")); +ok(mkdir "t/tmp"); +ok(! system("cp -R t/tinyblog t/tmp/in")); +ok(mkdir "t/tmp/in/post" or -d "t/tmp/in/post"); + +my $comment; + +$comment = <; + close $fh or return undef; + return $content; +} + +my $content = slurp("t/tmp/out/post/index.html"); +ok(defined $content); +ok($content =~ m/I conquered.*I explored.*I landed/s);