I didn't try to parameterize when a test should fail when we can't
remove ikiwiki.cgi because there already isn't one. (Hooray, natural
language.) Instead, we stop worrying about it and always tolerate
ENOENT.
+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
#######################################################################
# site 1: a perfectly ordinary ikiwiki
url => "http://example.com/wiki/",
cgiurl => "http://example.com/cgi-bin/ikiwiki.cgi",
);
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"));
# CGI wrapper should be exactly the requested mode
my (undef, undef, $mode, undef, undef,
# 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",
);
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"));
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
# 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",
);
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"));
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
# 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",
);
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"));
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
# 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",
);
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"));
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
# 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",
);
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"));
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
# 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",
);
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"));
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
cgiurl => "ikiwiki.cgi",
w3mmode => 1,
);
cgiurl => "ikiwiki.cgi",
w3mmode => 1,
);
-
-ok(unlink("t/tmp/ikiwiki.cgi"));
-ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
cgiurl => "ikiwiki.cgi",
w3mmode => 1,
);
cgiurl => "ikiwiki.cgi",
w3mmode => 1,
);
-
-ok(unlink("t/tmp/ikiwiki.cgi"));
-ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
cgiurl => "https://example.com/cgi-bin/ikiwiki.cgi",
reverse_proxy => 1,
);
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"));
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,
# CGI wrapper should be exactly the requested mode
(undef, undef, $mode, undef, undef,