]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - t/permalink.t
edb05a81b1bbdf487aee7b59fff19e6c48fae329
[git.ikiwiki.info.git] / t / permalink.t
1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4 use Test::More;
6 my $installed = $ENV{INSTALLED_TESTS};
8 my @command;
9 if ($installed) {
10         @command = qw(ikiwiki);
11 }
12 else {
13         ok(! system("make -s ikiwiki.out"));
14         @command = qw(perl -I. ./ikiwiki.out
15                 --underlaydir=underlays/basewiki
16                 --set underlaydirbase=underlays
17                 --templatedir=templates);
18 }
20 ok(! system("rm -rf t/tmp"));
21 ok(! system("mkdir t/tmp"));
22 ok(! system(@command, qw(--plugin inline --url=http://example.com
23                 --cgiurl=http://example.com/ikiwiki.cgi --rss --atom
24                 t/tinyblog t/tmp/out)));
25 # This guid should never, ever change, for any reason whatsoever!
26 my $guid="http://example.com/post/";
27 ok(length `egrep '<guid.*>$guid</guid>' t/tmp/out/index.rss`);
28 ok(length `egrep '<id>$guid</id>' t/tmp/out/index.atom`);
29 ok(! system("rm -rf t/tmp t/tinyblog/.ikiwiki"));
31 done_testing();