File: all_pod_files.t

package info (click to toggle)
libtest-pod-perl 1.52-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 188 kB
  • sloc: perl: 275; makefile: 8
file content (36 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (3)
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
35
36
#!perl -T

use strict;
use warnings;

use Test::More tests => 2;

BEGIN {
    use_ok( "Test::Pod" );
}

my @expected;
if ( $^O eq "VMS" ) {
    @expected = (
        File::Spec->catfile( 'lib', 'Test', 'Pod.pm' ),
        File::Spec->catfile( 't', 'pod', 'good-pod-script.' ),
        File::Spec->catfile( 't', 'pod', 'good-pod-script.bat' ),
        File::Spec->catfile( 't', 'pod', 'good.pod' ),
        File::Spec->catfile( 't', 'pod', 'no_pod.pod' ),
    );
}
else {
    # The expected files have slashes, not File::Spec separators, because
    # that's how File::Find does it.
    @expected = qw(
        lib/Test/Pod.pm
        t/pod/good-pod-script
        t/pod/good-pod-script.bat
        t/pod/good.pod
        t/pod/no_pod.pod
    );
}
my @files = sort map { lc } all_pod_files( "lib", "t/pod" );
@expected = sort map { lc } @expected;
s{\\}{/}g for @files, @expected;
is_deeply( \@files, \@expected, "Got all the distro files" );