File: 04_all_ok.t

package info (click to toggle)
libtest-hasversion-perl 0.014-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 172 kB
  • sloc: perl: 154; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 522 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/perl

use Test::Builder::Tester tests => 1;
use Test::More;
use Test::HasVersion;

my @expected = (
    'A.pm'       => 'ok',
    'lib/B.pm'   => 'ok',
    'lib/B/C.pm' => 'not ok',
);

my $count = 1;
while (@expected) {
    my $file = shift @expected;
    my $want = shift @expected;
    test_out("$want $count - $file has version");
    test_fail(+5) if $want eq 'not ok';
    $count++;
}

chdir "t/eg/" or die "Can't chdir to t/eg";
all_pm_version_ok();

test_test("all_pm_version_ok() including failures");