aboutsummaryrefslogtreecommitdiff
path: root/t/img.t
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2015-11-30 17:33:00 +0000
committerSimon McVittie <smcv@debian.org>2015-11-30 18:26:22 +0000
commitcdfb4ab1a3c60bf699b8d77618ec9bdf526cdb35 (patch)
tree6a33fd51436d66178fdfab689a8c6076cefa1c54 /t/img.t
parent78a47d44c7c7d798c0a16c17954caef57e4c192e (diff)
downloadikiwiki-cdfb4ab1a3c60bf699b8d77618ec9bdf526cdb35.tar
ikiwiki-cdfb4ab1a3c60bf699b8d77618ec9bdf526cdb35.tar.gz
Run autopkgtest tests using autodep8 and the pkg-perl team's infrastructure
Diffstat (limited to 't/img.t')
-rwxr-xr-xt/img.t24
1 files changed, 18 insertions, 6 deletions
diff --git a/t/img.t b/t/img.t
index 7f1f4e4b2..e02e54fc2 100755
--- a/t/img.t
+++ b/t/img.t
@@ -19,6 +19,22 @@ plan(skip_all => "Image::Magick not available")
use IkiWiki;
+my $installed = $ENV{INSTALLED_TESTS};
+
+my @command;
+if ($installed) {
+ @command = qw(ikiwiki);
+}
+else {
+ ok(! system("make -s ikiwiki.out"));
+ @command = qw(perl -I. ./ikiwiki.out
+ --underlaydir=underlays/basewiki
+ --set underlaydirbase=underlays
+ --templatedir=templates);
+}
+
+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");
@@ -58,11 +74,7 @@ EOF
);
ok(utime(333333333, 333333333, "t/tmp/in/imgconversions.mdwn"));
-ok(! system("make -s ikiwiki.out"));
-
-my $command = "perl -I. ./ikiwiki.out --set usedirs=0 --templatedir=templates --plugin img t/tmp/in t/tmp/out --verbose";
-
-ok(! system($command));
+ok(! system(@command));
sub size($) {
my $filename = shift;
@@ -98,7 +110,7 @@ is(size("$outpath/x6-a:b:c:d:e:f:g:h:i:j.png"), "6x6");
if (1) { # for easier testing
writefile("imgconversions.mdwn", "t/tmp/in", "nothing to see here");
- ok(! system("$command --refresh"));
+ ok(! system(@command, "--refresh"));
ok(! -e "$outpath/10x-simple.png");
ok(! -e "$outpath/10x-simple-svg.png");