File: debian-version.t

package info (click to toggle)
dh-make-perl 0.129
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,292 kB
  • sloc: perl: 5,640; makefile: 34; sh: 25
file content (22 lines) | stat: -rw-r--r-- 618 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
21
22
#!perl

use Test::More;

use DhMakePerl;

use FindBin qw($Bin);
use Dpkg::Changelog::Debian;

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

plan tests => 1;

my $cl = Dpkg::Changelog::Debian->new( range => { "count" => 1 } );
$cl->load("$Bin/../debian/changelog");

my $pkg_ver = $cl->[0]->get_version();
$pkg_ver =~ s/~.+//;        # ignore !foo suffix
$pkg_ver =~ s/\+.+$//;      # ignore +xxx suffix (e.g. +salsaci or +reallyxxx)
$pkg_ver =~ s/-[^-]+$//;    # ignore debian revision
is( $pkg_ver, $DhMakePerl::VERSION, 'Debian package version matches module version' );