From 6905ea23a80deb6b83937637c9e621038d9411d9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 2 Mar 2011 19:49:44 +0100 Subject: Update App::Dthumb filenames, add initial App::Dthumb test --- lib/App/Dthumb.pm | 4 ++-- t/20-app-dthumb.t | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 t/20-app-dthumb.t diff --git a/lib/App/Dthumb.pm b/lib/App/Dthumb.pm index 365eaba..49f4783 100755 --- a/lib/App/Dthumb.pm +++ b/lib/App/Dthumb.pm @@ -137,7 +137,7 @@ sub new { height => $conf{size} * $conf{spacing} . 'px', ); - $ref->{html} = $ref->{data}->get('html_start'); + $ref->{html} = $ref->{data}->get('html_start.dthumb'); return bless($ref, $obj); } @@ -337,7 +337,7 @@ Write the cached HTML data to F. sub write_out_html { my ($self) = @_; - $self->{html} .= $self->{data}->get('html_end'); + $self->{html} .= $self->{data}->get('html_end.dthumb'); open(my $fh, '>', $self->{config}->{file_index}); print {$fh} $self->{html}; diff --git a/t/20-app-dthumb.t b/t/20-app-dthumb.t new file mode 100755 index 0000000..9a81d0b --- /dev/null +++ b/t/20-app-dthumb.t @@ -0,0 +1,13 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.010; +use autodie; + +use Test::More tests => 2; + +use_ok('App::Dthumb'); + +my $dthumb = App::Dthumb->new(); + +isa_ok($dthumb, 'App::Dthumb'); -- cgit v1.2.3