diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-01-30 20:05:33 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-02-18 13:16:52 +0100 |
commit | 46913ee56d605038bf523d4fc89cc9291f48277b (patch) | |
tree | 22addd2480ddb3ccb5d9897cd08c7811888c4d6f /ext | |
parent | 7fa6cc82dc87eb2f81137861238570e42953b675 (diff) | |
download | perl-46913ee56d605038bf523d4fc89cc9291f48277b.tar.gz |
Test that functions in the groups in perlfunc.pod are in sorted order.
This ensures consistency in the documentation, and that the functions in
%Pod::Functions::Kinds are in sorted order.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Pod-Functions/Functions_pm.PL | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/Pod-Functions/Functions_pm.PL b/ext/Pod-Functions/Functions_pm.PL index 648cdfaae4..f0ad0bdbc5 100644 --- a/ext/Pod-Functions/Functions_pm.PL +++ b/ext/Pod-Functions/Functions_pm.PL @@ -109,6 +109,17 @@ if ($tap) { print "not ok $test - section '$_' has no type for Pod::Functions\n"; } } + foreach my $kind (sort keys %Kinds) { + my $funcs = $Kinds{$kind}; + ++$test; + my $want = join ' ', sort_funcs(@$funcs); + if ("@$funcs" eq $want) { + print "ok $test - category $kind is correctly sorted\n"; + } else { + print "not ok $test - category $kind is correctly sorted\n"; + print STDERR "# Have @$funcs\n# Want $want\n"; + } + } print "1..$test\n"; exit; } |