aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-05-05 20:44:11 -0400
committerSimon McVittie <smcv@debian.org>2016-05-06 06:58:56 +0100
commit21b9b9e306c36616f251b727d2e87a5d8538e5e4 (patch)
treef0d1ccf6684386fb56985a9af2bd6ad5cff7f888 /t
parent984ba82f1bea778de8d2b98593b470d651749d73 (diff)
downloadikiwiki-21b9b9e306c36616f251b727d2e87a5d8538e5e4.tar
ikiwiki-21b9b9e306c36616f251b727d2e87a5d8538e5e4.tar.gz
update test suite for svg passthrough by img directive
Remove build dependency libmagickcore-6.q16-2-extra which was only there for this test.
Diffstat (limited to 't')
-rwxr-xr-xt/img.t20
1 files changed, 6 insertions, 14 deletions
diff --git a/t/img.t b/t/img.t
index ec23d621f..71b69914e 100755
--- a/t/img.t
+++ b/t/img.t
@@ -36,7 +36,6 @@ else {
push @command, qw(--set usedirs=0 --plugin img t/tmp/in t/tmp/out --verbose);
my $magick = new Image::Magick;
-my $SVGS_WORK = defined $magick->QueryFormat("svg");
$magick->Read("t/img/twopages.pdf");
my $PDFS_WORK = defined $magick->Get("width");
@@ -65,11 +64,6 @@ ok(! system("cp t/img/twopages.pdf t/tmp/in/really-pdf.jpg"));
ok(! system("cp t/img/twopages.pdf t/tmp/in/really-pdf.png"));
ok(! system("cp t/img/twopages.pdf t/tmp/in/really-pdf.svg"));
-my $maybe_svg_img = "";
-if ($SVGS_WORK) {
- $maybe_svg_img = "[[!img bluesquare.svg size=10x]]";
-}
-
my $maybe_pdf_img = "";
if ($PDFS_WORK) {
$maybe_pdf_img = <<EOF;
@@ -87,7 +81,9 @@ writefile("imgconversions.mdwn", "t/tmp/in", <<EOF
[[!img hello:world.png size=x8]] expecting 8x8
[[!img a:b:c.png size=x4]]
[[!img a:b:c:d:e:f:g:h:i:j.png size=x6]]
-$maybe_svg_img
+[[!img bluesquare.svg size=42x]] expecting 42x
+[[!img bluesquare.svg size=x43]] expecting x43
+[[!img bluesquare.svg size=42x43]] expecting 42x43 because aspect rario not preserved
$maybe_pdf_img
# bad ideas
@@ -120,13 +116,9 @@ my $outhtml = readfile("$outpath.html");
is(size("$outpath/10x-redsquare.png"), "10x10");
ok(! -e "$outpath/30x-redsquare.png");
ok($outhtml =~ /width="30" height="30".*expecting 30x30/);
-
-SKIP: {
- skip "SVG support not installed (try libmagickcore-extra)", 1
- unless $SVGS_WORK;
- # if this fails, you need libmagickcore-6.q16-2-extra installed
- is(size("$outpath/10x-bluesquare.png"), "10x10");
-}
+ok($outhtml =~ /width="42".*expecting 42x/);
+ok($outhtml =~ /height="43".*expecting x43/);
+ok($outhtml =~ /width="42" height="43".*expecting 42x43/);
SKIP: {
skip "PDF support not installed (try ghostscript)", 2