);
}
+sub thoroughly_rebuild {
+ ok(unlink("t/tmp/ikiwiki.cgi") || $!{ENOENT});
+ ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
+}
+
#######################################################################
# site 1: a perfectly ordinary ikiwiki
url => "http://example.com/wiki/",
cgiurl => "http://example.com/cgi-bin/ikiwiki.cgi",
);
-
-ok(unlink("t/tmp/ikiwiki.cgi") || $!{ENOENT});
-ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
+thoroughly_rebuild();
# CGI wrapper should be exactly the requested mode
my (undef, undef, $mode, undef, undef,
url => "http://example.com/wiki/",
cgiurl => "http://example.com/cgi-bin/ikiwiki.cgi",
);
-
-ok(unlink("t/tmp/ikiwiki.cgi") || $!{ENOENT});
-ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
+thoroughly_rebuild();
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
url => "http://static.example.com/",
cgiurl => "http://cgi.example.com/ikiwiki.cgi",
);
-
-ok(unlink("t/tmp/ikiwiki.cgi"));
-ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
+thoroughly_rebuild();
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
url => "http://static.example.com/",
cgiurl => "http://cgi.example.com/ikiwiki.cgi",
);
-
-ok(unlink("t/tmp/ikiwiki.cgi"));
-ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
+thoroughly_rebuild();
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
url => "https://example.com/wiki/",
cgiurl => "https://example.com/cgi-bin/ikiwiki.cgi",
);
-
-ok(unlink("t/tmp/ikiwiki.cgi"));
-ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
+thoroughly_rebuild();
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
url => "http://example.com/wiki/",
cgiurl => "https://example.com/cgi-bin/ikiwiki.cgi",
);
-
-ok(unlink("t/tmp/ikiwiki.cgi"));
-ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
+thoroughly_rebuild();
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
url => "http://example.com/wiki/",
cgiurl => "https://example.com/cgi-bin/ikiwiki.cgi",
);
-
-ok(unlink("t/tmp/ikiwiki.cgi"));
-ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
+thoroughly_rebuild();
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
cgiurl => "ikiwiki.cgi",
w3mmode => 1,
);
-
-ok(unlink("t/tmp/ikiwiki.cgi"));
-ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
+thoroughly_rebuild();
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
cgiurl => "ikiwiki.cgi",
w3mmode => 1,
);
-
-ok(unlink("t/tmp/ikiwiki.cgi"));
-ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
+thoroughly_rebuild();
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
cgiurl => "https://example.com/cgi-bin/ikiwiki.cgi",
reverse_proxy => 1,
);
-
-ok(unlink("t/tmp/ikiwiki.cgi"));
-ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
+thoroughly_rebuild();
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,