File: 90_MANIFEST.t

package info (click to toggle)
libgraphics-tiff-perl 21-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 332 kB
  • sloc: perl: 3,783; ansic: 10; makefile: 3
file content (33 lines) | stat: -rw-r--r-- 825 bytes parent folder | download | duplicates (2)
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
31
32
33
use strict;
use warnings;
use English;
use Graphics::TIFF ':all';
use Test::More tests => 2;

my $git;
SKIP: {
    skip 'Need the git repository to compare the MANIFEST.', 1
      unless (
        -d '.git'
        and eval {
            $git = `git ls-tree --name-status -r HEAD | grep -E -v '^\.git'`;
        }
      );
    is( $git, `cat MANIFEST`, 'MANIFEST up to date' );
}

local $INPUT_RECORD_SEPARATOR = undef;
my $file = $INC{'Graphics/TIFF.pm'};
open my $fh, '<:encoding(UTF8)', $file
  or die "Error: cannot open $file\n";
my $text = <$fh>;
close $fh or die "Error: cannot close $file\n";

if ( $text =~ /=head1\s+VERSION\s+([0-9][.]?[0-9]*)/xsm ) {
    my $version = $1;
    is( $version, $Graphics::TIFF::VERSION,
        'version number correctly documented' );
}
else {
    fail 'version string not found';
}