blob: 42e9b415e0170d3e84b9b780ead3e490ea4ebfc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use autodie;
use App::Dthumb::Data;
use Test::More;
opendir(my $share, 'share');
my @files = grep { /^[^.]/ } readdir($share);
closedir($share);
plan(
tests => 1 + scalar @files,
);
my $dthumb = App::Dthumb::Data->new();
isa_ok($dthumb, 'App::Dthumb::Data', 'App::Dthumb::Data->new()');
for my $file (@files) {
open(my $fh, '<', "share/${file}");
my $data = do { local $/ = undef; <$fh> };
close($fh);
is($dthumb->get($file), $data, "\$dthumb->get($file)");
}
|