From 97ea33ec84ab05d8c2ac1cf669d90f3d81b835f4 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 4 Mar 2011 17:13:18 +0100 Subject: App::Dthumb::Data get: Return undef for invalid files --- t/29-app-dthumb-data.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 't/29-app-dthumb-data.t') diff --git a/t/29-app-dthumb-data.t b/t/29-app-dthumb-data.t index 42e9b41..7ca9f2d 100755 --- a/t/29-app-dthumb-data.t +++ b/t/29-app-dthumb-data.t @@ -12,7 +12,7 @@ my @files = grep { /^[^.]/ } readdir($share); closedir($share); plan( - tests => 1 + scalar @files, + tests => 2 + scalar @files, ); my $dthumb = App::Dthumb::Data->new(); @@ -26,3 +26,5 @@ for my $file (@files) { is($dthumb->get($file), $data, "\$dthumb->get($file)"); } + +is($dthumb->get('404notfound'), undef, '$dthumb->get on non-existing file'); -- cgit v1.2.3