diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-05-05 20:44:11 -0400 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2016-05-06 06:58:56 +0100 |
commit | 21b9b9e306c36616f251b727d2e87a5d8538e5e4 (patch) | |
tree | f0d1ccf6684386fb56985a9af2bd6ad5cff7f888 | |
parent | 984ba82f1bea778de8d2b98593b470d651749d73 (diff) | |
download | ikiwiki-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.
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | t/img.t | 20 |
2 files changed, 7 insertions, 15 deletions
diff --git a/debian/control b/debian/control index fb841bcb3..60d0e82db 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ Build-Depends-Indep: libhtml-scrubber-perl, libhtml-template-perl, libimage-magick-perl | perlmagick, - libmagickcore-6.q16-2-extra | libmagickcore-extra, + libmagickcore-extra, libnet-openid-consumer-perl, librpc-xml-perl, libtext-markdown-discount-perl, @@ -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 |