From: Simon McVittie Date: Mon, 18 Jan 2016 09:19:42 +0000 (+0000) Subject: img test: skip testing PDFs if unsupported X-Git-Tag: debian/3.20141016.3~13 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/f16158f56383ac911d5778360491a2d4e10ce8ff?hp=70950d20ed240a9d0d09e2fb6a4c77376dd3e94e img test: skip testing PDFs if unsupported --- diff --git a/t/img.t b/t/img.t index 2473b9d76..59f43c2ae 100755 --- a/t/img.t +++ b/t/img.t @@ -21,6 +21,9 @@ BEGIN { use_ok("Image::Magick"); } 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"); + ok(! system("rm -rf t/tmp; mkdir -p t/tmp/in")); ok(! system("cp t/img/redsquare.png t/tmp/in/redsquare.png")); @@ -43,6 +46,14 @@ if ($SVGS_WORK) { $maybe_svg_img = "[[!img bluesquare.svg size=10x]]"; } +my $maybe_pdf_img = ""; +if ($PDFS_WORK) { + $maybe_pdf_img = <