From 46913ee56d605038bf523d4fc89cc9291f48277b Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 30 Jan 2012 20:05:33 +0100 Subject: 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. --- ext/Pod-Functions/Functions_pm.PL | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ext/Pod-Functions') 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; } -- cgit v1.2.1