static-copy.t skips a test without HTTPS support

The static.css file is copied from https://oddmuse.org/ -- so if
LWP::Protocol::https is not installed, this cannot work.
This commit is contained in:
Alex Schroeder
2015-07-21 12:40:36 +02:00
parent abdf4e2a9e
commit 86a01c1505
2 changed files with 11 additions and 3 deletions

View File

@@ -239,7 +239,7 @@ sub StaticWriteCss {
$css = GetPageContent($StyleSheetPage);
}
if (not $css) {
$css = GetRaw('https://www.oddmuse.org/default.css');
$css = GetRaw('https://oddmuse.org/default.css');
}
WriteStringToFile("$StaticDir/static.css", $css) if $css;
chmod 0644,"$StaticDir/static.css";

View File

@@ -141,8 +141,16 @@ xpath_test_file("$DataDir/static/Test.html",
'//a[text()="HomePage"][@href="HomePage.html"]');
test_file("$DataDir/static/Test.html",
"Ümlaute");
test_file("$DataDir/static/static.css",
"This is the default CSS file for Oddmuse wikis");
SKIP: {
eval {
require LWP::Protocol::https;
};
skip "LWP::Protocol::https not installed", 1 if $@;
test_file("$DataDir/static/static.css",
"This is the default CSS file for Oddmuse wikis");
}
# make sure spaces are translated to underscores (fixed in image.pl)
add_module('image.pl');