From 94268a46cd30fc72b51714e42e9db741eb29cc73 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 4 Jun 2011 16:55:24 +0100 Subject: [PATCH] comments: add regression test for sorting by date --- t/comments.t | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100755 t/comments.t 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); -- 2.39.5