extend some variable types to avoid overflows for mediancut
[imager.git] / xt / x40checklib.t
CommitLineData
0128634c
TC
1#!perl -w
2#
3# Each sub-module ships with our custom Devel::CheckLib, make sure
4# they all match
5use strict;
6use Test::More;
7
8my @subs = qw(FT2 GIF JPEG PNG T1 TIFF W32);
9
10plan tests => 1 + @subs;
11
12# load the base file
13
14my $base = load("inc/Devel/CheckLib.pm");
15
16ok($base, "Loaded base file");
17
18for my $sub (@subs) {
19 my $data = load("$sub/inc/Devel/CheckLib.pm");
20
21 # I'd normally use is() here, but it's excessively noisy when
22 # comparing this size of data
23 ok(defined($data) && $data eq $base, "check $sub");
24}
25
26sub load {
27 my ($filename) = @_;
28
29 if (open my $f, "<", $filename) {
30 my $data = do { local $/; <$f> };
31 close $f;
32
33 return $data;
34 }
35 else {
36 diag "Cannot load $filename: $!\n";
37 return;
38 }
39}