aboutsummaryrefslogtreecommitdiff
path: root/t/img.t
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2014-09-01 08:40:54 +0100
committerSimon McVittie <smcv@debian.org>2014-09-01 08:40:54 +0100
commitd55d06ea886bf9f212e6d83301800b1176cee60d (patch)
tree2470d063fbe7a5f47d2f3cfd6b9911408d3da116 /t/img.t
parent0f9ea1f720e0899f325ad3a9a923ee2b7bc2a038 (diff)
downloadikiwiki-d55d06ea886bf9f212e6d83301800b1176cee60d.tar
ikiwiki-d55d06ea886bf9f212e6d83301800b1176cee60d.tar.gz
use readfile() instead of reinventing it
This avoids potential action-at-a-distance from locally redefining $/ but never reaching the end of the redefinition's scope.
Diffstat (limited to 't/img.t')
-rwxr-xr-xt/img.t5
1 files changed, 1 insertions, 4 deletions
diff --git a/t/img.t b/t/img.t
index 088a98328..9a48cb1c5 100755
--- a/t/img.t
+++ b/t/img.t
@@ -52,10 +52,7 @@ sub size($) {
}
my $outpath = "t/tmp/out/imgconversions";
-open (my $outhtmlfd, "<", "$outpath.html");
-local $/=undef;
-my $outhtml = <$outhtmlfd>;
-close $outhtmlfd;
+my $outhtml = readfile("$outpath.html");
is(size("$outpath/10x-redsquare.png"), "10x10");
ok(! -e "$outpath/30x-redsquare.png");