ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers"));
}
+sub check_cgi_mode_bits {
+ my (undef, undef, $mode, undef, undef,
+ undef, undef, undef, undef, undef,
+ undef, undef, undef) = stat("t/tmp/ikiwiki.cgi");
+ is($mode & 07777, 0754);
+}
+
#######################################################################
# site 1: a perfectly ordinary ikiwiki
cgiurl => "http://example.com/cgi-bin/ikiwiki.cgi",
);
thoroughly_rebuild();
-
-# CGI wrapper should be exactly the requested mode
-my (undef, undef, $mode, undef, undef,
- undef, undef, undef, undef, undef,
- undef, undef, undef) = stat("t/tmp/ikiwiki.cgi");
-is($mode & 07777, 0754);
+check_cgi_mode_bits();
ok(-e "t/tmp/out/a/b/c/index.html");
$content = readfile("t/tmp/out/a/b/c/index.html");
cgiurl => "http://example.com/cgi-bin/ikiwiki.cgi",
);
thoroughly_rebuild();
-
-# CGI wrapper should be exactly the requested mode
-(undef, undef, $mode, undef, undef,
- undef, undef, undef, undef, undef,
- undef, undef, undef) = stat("t/tmp/ikiwiki.cgi");
-is($mode & 07777, 0754);
+check_cgi_mode_bits();
ok(-e "t/tmp/out/a/b/c/index.html");
$content = readfile("t/tmp/out/a/b/c/index.html");
cgiurl => "http://cgi.example.com/ikiwiki.cgi",
);
thoroughly_rebuild();
-
-# CGI wrapper should be exactly the requested mode
-(undef, undef, $mode, undef, undef,
- undef, undef, undef, undef, undef,
- undef, undef, undef) = stat("t/tmp/ikiwiki.cgi");
-is($mode & 07777, 0754);
+check_cgi_mode_bits();
ok(-e "t/tmp/out/a/b/c/index.html");
$content = readfile("t/tmp/out/a/b/c/index.html");
cgiurl => "http://cgi.example.com/ikiwiki.cgi",
);
thoroughly_rebuild();
-
-# CGI wrapper should be exactly the requested mode
-(undef, undef, $mode, undef, undef,
- undef, undef, undef, undef, undef,
- undef, undef, undef) = stat("t/tmp/ikiwiki.cgi");
-is($mode & 07777, 0754);
+check_cgi_mode_bits();
ok(-e "t/tmp/out/a/b/c/index.html");
$content = readfile("t/tmp/out/a/b/c/index.html");
cgiurl => "https://example.com/cgi-bin/ikiwiki.cgi",
);
thoroughly_rebuild();
-
-# CGI wrapper should be exactly the requested mode
-(undef, undef, $mode, undef, undef,
- undef, undef, undef, undef, undef,
- undef, undef, undef) = stat("t/tmp/ikiwiki.cgi");
-is($mode & 07777, 0754);
+check_cgi_mode_bits();
ok(-e "t/tmp/out/a/b/c/index.html");
$content = readfile("t/tmp/out/a/b/c/index.html");
cgiurl => "https://example.com/cgi-bin/ikiwiki.cgi",
);
thoroughly_rebuild();
-
-# CGI wrapper should be exactly the requested mode
-(undef, undef, $mode, undef, undef,
- undef, undef, undef, undef, undef,
- undef, undef, undef) = stat("t/tmp/ikiwiki.cgi");
-is($mode & 07777, 0754);
+check_cgi_mode_bits();
ok(-e "t/tmp/out/a/b/c/index.html");
$content = readfile("t/tmp/out/a/b/c/index.html");
cgiurl => "https://example.com/cgi-bin/ikiwiki.cgi",
);
thoroughly_rebuild();
-
-# CGI wrapper should be exactly the requested mode
-(undef, undef, $mode, undef, undef,
- undef, undef, undef, undef, undef,
- undef, undef, undef) = stat("t/tmp/ikiwiki.cgi");
-is($mode & 07777, 0754);
+check_cgi_mode_bits();
ok(-e "t/tmp/out/a/b/c/index.html");
$content = readfile("t/tmp/out/a/b/c/index.html");
w3mmode => 1,
);
thoroughly_rebuild();
-
-# CGI wrapper should be exactly the requested mode
-(undef, undef, $mode, undef, undef,
- undef, undef, undef, undef, undef,
- undef, undef, undef) = stat("t/tmp/ikiwiki.cgi");
-is($mode & 07777, 0754);
+check_cgi_mode_bits();
ok(-e "t/tmp/out/a/b/c/index.html");
$content = readfile("t/tmp/out/a/b/c/index.html");
w3mmode => 1,
);
thoroughly_rebuild();
-
-# CGI wrapper should be exactly the requested mode
-(undef, undef, $mode, undef, undef,
- undef, undef, undef, undef, undef,
- undef, undef, undef) = stat("t/tmp/ikiwiki.cgi");
-is($mode & 07777, 0754);
+check_cgi_mode_bits();
ok(-e "t/tmp/out/a/b/c/index.html");
$content = readfile("t/tmp/out/a/b/c/index.html");
reverse_proxy => 1,
);
thoroughly_rebuild();
-
-# CGI wrapper should be exactly the requested mode
-(undef, undef, $mode, undef, undef,
- undef, undef, undef, undef, undef,
- undef, undef, undef) = stat("t/tmp/ikiwiki.cgi");
-is($mode & 07777, 0754);
+check_cgi_mode_bits();
ok(-e "t/tmp/out/a/b/c/index.html");
$content = readfile("t/tmp/out/a/b/c/index.html");