# Black-box (ish) test for relative linking between CGI and static content
+my $installed = $ENV{INSTALLED_TESTS};
+
+my @command;
+if ($installed) {
+ @command = qw(ikiwiki);
+}
+else {
+ ok(! system("make -s ikiwiki.out"));
+ @command = ("perl", "-I".getcwd, qw(./ikiwiki.out
+ --underlaydir=underlays/basewiki
+ --set underlaydirbase=underlays
+ --templatedir=templates));
+}
+
sub parse_cgi_content {
my $content = shift;
my %bits;
wikiname: this is the name of my wiki
srcdir: t/tmp/in
destdir: t/tmp/out
-templatedir: templates
$urlline
cgiurl: $args{cgiurl}
$w3mmodeline
sub thoroughly_rebuild {
ok(unlink("t/tmp/ikiwiki.cgi") || $!{ENOENT});
- ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
+ ok(! system(@command, qw(--setup t/tmp/test.setup --rebuild --wrappers)));
}
sub check_cgi_mode_bits {
}
sub test_startup {
- ok(! system("make -s ikiwiki.out"));
ok(! system("rm -rf t/tmp"));
ok(! system("mkdir t/tmp"));