X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/ef6ce800c5a8babdaf20af9cdcf294cab77c1b47..b2a155af1156a8966d25d80509a542f2ca3b6dc2:/t/porting/diag.t diff --git a/t/porting/diag.t b/t/porting/diag.t index 22cde90..b892dfa 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -76,7 +76,20 @@ my $category_re = qr/ [a-z0-9_:]+?/; # Note: requires an initial space my $severity_re = qr/ . (?: \| . )* /x; # A severity is a single char, but can # be of the form 'S|P|W' my @same_descr; +my $depth = 0; while (<$diagfh>) { + if (m/^=over/) { + $depth++; + next; + } + if (m/^=back/) { + $depth--; + next; + } + + # Stuff deeper than main level is ignored + next if $depth != 1; + if (m/^=item (.*)/) { $cur_entry = $1; @@ -141,6 +154,11 @@ while (<$diagfh>) { } } +if ($depth != 0) { + diag ("Unbalance =over/=back. Fix before proceeding; over - back = " . $depth); + exit(1); +} + foreach my $cur_entry ( keys %entries) { next if $entries{$cur_entry}{todo}; # If in this file, won't have a severity if (! exists $entries{$cur_entry}{severity}