Debian Codegraph @

t/001-podsyntax.t

raw
1 # DO NOT EDIT! This file is written by perl_setup_dist.
2 # If needed, you can add content at the end of the file.
3
4 #!/usr/bin/perl
5
6 use strict;
7 use warnings;
8
9 use English;
10 use FindBin;
11 use Test2::V0;
12 use Readonly;
13
14 our $VERSION = 0.01;
15
16 BEGIN {
17 if ($ENV{HARNESS_ACTIVE} && !$ENV{EXTENDED_TESTING}) {
18 skip_all('Extended test. Run manually or set $ENV{EXTENDED_TESTING} to a true value to run.');
19 }
20 }
21
22 # Ensure a recent version of Test::Pod is present
23 BEGIN {
24 Readonly my $TEST_POD_VERSION => 1.22;
25 eval "use Test::Pod ${TEST_POD_VERSION}"; ## no critic (ProhibitStringyEval, RequireCheckingReturnValueOfEval)
26 if ($EVAL_ERROR) {
27 skip_all("Test::Pod ${TEST_POD_VERSION} required for testing POD");
28 }
29 }
30
31 my @dirs;
32
33 sub add_if_exists {
34 return push @dirs, $_[0] if -d $_[0];
35 return;
36 }
37
38 if (!add_if_exists("${FindBin::Bin}/../blib")) {
39 add_if_exists("${FindBin::Bin}/../lib");
40 }
41 add_if_exists("${FindBin::Bin}/../script");
42 my @files = all_pod_files(@dirs);
43 my $nb_files = @files;
44 diag("Testing $nb_files POD files.");
45
46 all_pod_files_ok(@files);
47
48 # End of the template. You can add custom content below this line.