File: image.t

package info (click to toggle)
liburi-title-perl 1.904-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 188 kB
  • sloc: perl: 533; makefile: 6
file content (30 lines) | stat: -rw-r--r-- 637 bytes parent folder | download
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
29
30
use warnings;
use strict;
use Test::More;
use URI::Title qw(title);

is(
    title('t/images/camel_head.v25e738a.png'),
    "camel_head.v25e738a.png (png 60x65)",
    "camel_head.v25e738a.png (png 60x65)"
);

SKIP: {
    skip "Image::ExifTool or Image::PNG::Libpng not installed", 1
      unless eval { require Image::ExifTool }
      || eval { require Image::PNG::Libpng };
    is(
        title('t/images/has_title.png'),
        "checker (png 32x32)",
        "checker (png 32x32)"
    );

    is(
        title('t/images/no_title.png'),
        "no_title.png (png 32x32)",
        "no_title.png (png 32x32)"
    );

}

done_testing;