File: debian-version.t

package info (click to toggle)
dh-make-perl 0.75-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,520 kB
  • sloc: perl: 4,730; makefile: 94
file content (20 lines) | stat: -rw-r--r-- 546 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!perl -T

use Test::More;

use DhMakePerl;

use FindBin qw($Bin);
use Parse::DebianChangelog;

plan skip_all => "'no 'debian/changelog' found"
    unless -f "$Bin/../debian/changelog";

plan tests => 1;

my $cl = Parse::DebianChangelog->init->parse( { infile => "$Bin/../debian/changelog" } );

my $pkg_ver = $cl->data( { count => 1   } )->[0]->{Version};
$pkg_ver =~ s/~.+//;        # ignore !foo suffix
$pkg_ver =~ s/-[^-]+$//;    # ignore debian revision
is( $pkg_ver, $DhMakePerl::VERSION, 'Debian package version matches module version' );