File: DpkgLists.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 (30 lines) | stat: -rwxr-xr-x 779 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
23
24
25
26
27
28
29
30
#!/usr/bin/perl -w

use strict;
use warnings;

use Test::More tests => 7;

BEGIN {
    use_ok 'Debian::DpkgLists';
};

my $m = 'Debian::DpkgLists';

is_deeply( [ $m->scan_full_path('/usr/bin/perl') ],
    ['perl-base'], '/usr/bin/perl is in perl-base' );

my @found = $m->scan_partial_path('/bin/perl');
ok( grep( 'perl-base', @found ), 'partial /bin/perl is in perl-base' );

@found = $m->scan_pattern(qr{/bin/perl$});
ok( grep( 'perl-base', @found ), 'qr{/bin/perl$} is in perl-base' );

is_deeply( [ $m->scan_perl_mod('Errno') ],
    ['perl-base'], 'Errno is in perl-base' );

is_deeply( [ $m->scan_perl_mod('IO::Socket::UNIX') ],
    ['perl-base'], 'IO::Socket::UNIX is in perl-base' );

is_deeply( [ $m->scan_perl_mod('utf8') ],
    ['perl-base'], 'utf8 is in perl-base' );