From f16158f56383ac911d5778360491a2d4e10ce8ff Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 18 Jan 2016 09:19:42 +0000 Subject: [PATCH] img test: skip testing PDFs if unsupported --- t/img.t | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) 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 = <