summaryrefslogtreecommitdiff
path: root/t/29-app-dthumb-data.t
diff options
context:
space:
mode:
Diffstat (limited to 't/29-app-dthumb-data.t')
-rwxr-xr-xt/29-app-dthumb-data.t28
1 files changed, 28 insertions, 0 deletions
diff --git a/t/29-app-dthumb-data.t b/t/29-app-dthumb-data.t
new file mode 100755
index 0000000..42e9b41
--- /dev/null
+++ b/t/29-app-dthumb-data.t
@@ -0,0 +1,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)");
+}