diff options
author | Simon McVittie <smcv@debian.org> | 2015-11-30 17:33:00 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2015-11-30 18:26:22 +0000 |
commit | cdfb4ab1a3c60bf699b8d77618ec9bdf526cdb35 (patch) | |
tree | 6a33fd51436d66178fdfab689a8c6076cefa1c54 /t/comments.t | |
parent | 78a47d44c7c7d798c0a16c17954caef57e4c192e (diff) | |
download | ikiwiki-cdfb4ab1a3c60bf699b8d77618ec9bdf526cdb35.tar ikiwiki-cdfb4ab1a3c60bf699b8d77618ec9bdf526cdb35.tar.gz |
Run autopkgtest tests using autodep8 and the pkg-perl team's infrastructure
Diffstat (limited to 't/comments.t')
-rwxr-xr-x | t/comments.t | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/t/comments.t b/t/comments.t index 41e731c80..a5add9701 100755 --- a/t/comments.t +++ b/t/comments.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More 'no_plan'; +use Test::More; use IkiWiki; ok(! system("rm -rf t/tmp")); @@ -9,6 +9,20 @@ 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 $installed = $ENV{INSTALLED_TESTS}; + +my @command; +if ($installed) { + @command = qw(ikiwiki); +} +else { + ok(! system("make -s ikiwiki.out")); + @command = qw(perl -I. ./ikiwiki.out + --underlaydir=underlays/basewiki + --set underlaydirbase=underlays + --templatedir=templates); +} + my $comment; $comment = <<EOF; @@ -39,8 +53,7 @@ ok(utime(222222222, 222222222, "t/tmp/in/post/comment_2._comment")); ok(utime(333333333, 333333333, "t/tmp/in/post/comment_1._comment")); # Build the wiki -ok(! system("make -s ikiwiki.out")); -ok(! system("perl -I. ./ikiwiki.out --verbose --plugin comments --url=http://example.com --cgiurl=http://example.com/ikiwiki.cgi --rss --atom --underlaydir=underlays/basewiki --set underlaydirbase=underlays --set comments_pagespec='*' --templatedir=templates t/tmp/in t/tmp/out")); +ok(! system(@command, qw(--verbose --plugin comments --url=http://example.com --cgiurl=http://example.com/ikiwiki.cgi --rss --atom --set comments_pagespec=* t/tmp/in t/tmp/out))); # Check that the comments are in the right order @@ -55,3 +68,5 @@ sub slurp { my $content = slurp("t/tmp/out/post/index.html"); ok(defined $content); ok($content =~ m/I conquered.*I explored.*I landed/s); + +done_testing(); |