File: debian-version.t

package info (click to toggle)
dh-make-perl 0.70-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 984 kB
  • ctags: 203
  • sloc: perl: 4,318; makefile: 88
file content (18 lines) | stat: -rw-r--r-- 539 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!perl -T

use Test::More tests => 1;

use DhMakePerl;

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

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

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' );