File: 06trustme.t

package info (click to toggle)
libpod-coverage-perl 0.23-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 240 kB
  • sloc: perl: 611; makefile: 7
file content (30 lines) | stat: -rw-r--r-- 872 bytes parent folder | download | duplicates (6)
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 Test::More tests => 10;
use lib 't/lib';

BEGIN {
    use_ok( 'Pod::Coverage' );
    use_ok( 'Pod::Coverage::ExportOnly' );
}

my $obj = new Pod::Coverage package => 'Trustme';
isa_ok( $obj, 'Pod::Coverage' );
is($obj->coverage, 3/7, "without private or trustme it gets it right");

$obj = new Pod::Coverage package => 'Trustme', private => [qr/^private$/];
isa_ok( $obj, 'Pod::Coverage' );
is($obj->coverage, 3/6, "with just private it gets it right");

$obj = new Pod::Coverage
    package => 'Trustme',
    private => [qr/^private$/],
    trustme => [qr/u/];
isa_ok( $obj, 'Pod::Coverage' );
is($obj->coverage, 5/6, "with private and trustme it gets it right");

$obj = new Pod::Coverage
    package => 'Trustme',
    trustme => [qr/u/];
isa_ok( $obj, 'Pod::Coverage' );
is($obj->coverage, 5/7, "with just trustme it gets it right");