File: 02_basic.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 (34 lines) | stat: -rwxr-xr-x 576 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
26
27
28
29
30
31
32
33
34
#!/usr/bin/perl

use strict;

use Test::Builder::Tester 1.04 tests => 6;

use Test::More;

# tests pm_version_ok

BEGIN {
    use_ok('Test::HasVersion');
}

ok( chdir "t/eg", "cd t/eg" );

test_out("ok 1 - A.pm has version");
pm_version_ok("A.pm");
test_test();

test_out("not ok 1 - X.pm has version");
test_fail(+1);
pm_version_ok("X.pm");
test_diag("X.pm does not exist");
test_test();

test_out("ok 1 - lib/B.pm has version");
pm_version_ok("lib/B.pm");
test_test();

test_out("not ok 1 - lib/B/C.pm has version");
test_fail(+1);
pm_version_ok("lib/B/C.pm");
test_test();