Skip to content

Commit 332996b

Browse files
author
Greg Sabino Mullane
committed
No tabs please.
1 parent cc05424 commit 332996b

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

t/05_docs.t

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,62 +25,62 @@ if (!open $fh, '<', $file) {
2525
close $fh or warn qq{Could not close "$file": $!\n};
2626

2727
if ($slurp !~ /\$action_info = (.+?)\}/s) {
28-
fail q{Could not find the 'action_info' section};
28+
fail q{Could not find the 'action_info' section};
2929
}
3030
my $chunk = $1;
3131
my @actions;
3232
for my $line (split /\n/ => $chunk) {
33-
push @actions => $1 if $line =~ /^\s*(\w+)/;
33+
push @actions => $1 if $line =~ /^\s*(\w+)/;
3434
}
3535

3636
## Make sure each of those still exists as a subroutine
3737
for my $action (@actions) {
38-
next if $action =~ /last_auto/;
38+
next if $action =~ /last_auto/;
3939

40-
my $match = $action;
41-
$match = 'pgb_pool' if $match =~ /pgb_pool/;
40+
my $match = $action;
41+
$match = 'pgb_pool' if $match =~ /pgb_pool/;
4242

43-
if ($slurp !~ /\n\s*sub check_$match/) {
44-
fail qq{Could not find a check sub for the action '$action' ($match)!};
45-
}
43+
if ($slurp !~ /\n\s*sub check_$match/) {
44+
fail qq{Could not find a check sub for the action '$action' ($match)!};
45+
}
4646
}
4747
pass 'Found matching check subroutines for each action inside of action_info';
4848

4949
## Make sure each check subroutine is documented
5050
while ($slurp =~ /\n\s*sub check_(\w+)/g) {
51-
my $match = $1;
51+
my $match = $1;
5252

53-
## Skip known exceptions:
54-
next if $match eq 'last_vacuum_analyze' or $match eq 'pgb_pool';
53+
## Skip known exceptions:
54+
next if $match eq 'last_vacuum_analyze' or $match eq 'pgb_pool';
5555

56-
if (! grep { $match eq $_ } @actions) {
57-
fail qq{The check subroutine check_$match was not found in the help!};
58-
}
56+
if (! grep { $match eq $_ } @actions) {
57+
fail qq{The check subroutine check_$match was not found in the help!};
58+
}
5959
}
6060
pass 'Found matching help for each check subroutine';
6161

6262
## Make sure each item in the top help is in the POD
6363
my @pods;
6464
while ($slurp =~ /\n=head2 B<(\w+)>/g) {
65-
my $match = $1;
65+
my $match = $1;
6666

67-
## Skip known exceptions:
68-
next if $match =~ /symlinks/;
67+
## Skip known exceptions:
68+
next if $match =~ /symlinks/;
6969

70-
if (! grep { $match eq $_ } @actions) {
71-
fail qq{The check subroutine check_$match was not found in the POD!};
72-
}
70+
if (! grep { $match eq $_ } @actions) {
71+
fail qq{The check subroutine check_$match was not found in the POD!};
72+
}
7373

74-
push @pods => $match;
74+
push @pods => $match;
7575
}
7676
pass 'Found matching POD for each check subroutine';
7777

7878
## Make sure things are in the same order for both top (--help) and bottom (POD)
7979
for my $action (@actions) {
80-
my $pod = shift @pods;
81-
if ($action ne $pod) {
82-
fail qq{Docs out of order: expected $action in POD section, but got $pod instead!};
83-
}
80+
my $pod = shift @pods;
81+
if ($action ne $pod) {
82+
fail qq{Docs out of order: expected $action in POD section, but got $pod instead!};
83+
}
8484
}
8585
pass 'POD actions appear in the correct order';
8686

0 commit comments

Comments
 (0)