Debian Codegraph @

t/release-trailing-space.t

raw
1 #!perl
2
3 BEGIN {
4 unless ($ENV{RELEASE_TESTING}) {
5 print qq{1..0 # SKIP these tests are for release candidate testing\n};
6 exit
7 }
8 }
9
10
11 use strict;
12 use warnings;
13
14 use Test::More;
15
16 eval "use Test::TrailingSpace";
17 if ($@)
18 {
19 plan skip_all => "Test::TrailingSpace required for trailing space test.";
20 }
21 else
22 {
23 plan tests => 1;
24 }
25
26 # TODO: add .pod, .PL, the README/Changes/TODO/etc. documents and possibly
27 # some other stuff.
28 my $finder = Test::TrailingSpace->new(
29 {
30 root => '.',
31 filename_regex => qr#(?:\.(?:t|pm|pl|xs|c|h|txt|pod|PL)|README|Changes|TODO|LICENSE)\z#,
32 },
33 );
34
35 # TEST
36 $finder->no_trailing_space(
37 "No trailing space was found."
38 );