From: Vincent Pit Date: Fri, 23 Aug 2013 20:10:51 +0000 (-0300) Subject: Make sure the POD headings are linkable X-Git-Tag: v0.05~4 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=f066e024d35da2a36ab88a8b6af6f4796ccf602c;p=perl%2Fmodules%2FTest-Leaner.git Make sure the POD headings are linkable --- diff --git a/lib/Test/Leaner.pm b/lib/Test/Leaner.pm index 08c8de5..19e903a 100644 --- a/lib/Test/Leaner.pm +++ b/lib/Test/Leaner.pm @@ -273,7 +273,11 @@ sub _sanitize_comment { The following functions from L are implemented and exported by default. -=head2 C<< plan [ tests => $count | 'no_plan' | skip_all => $reason ] >> +=head2 C + + plan tests => $count; + plan 'no_plan'; + plan skip_all => $reason; See L. @@ -336,7 +340,9 @@ sub import { goto &Exporter::import; } -=head2 C<< skip $reason => $count >> +=head2 C + + skip $reason => $count; See L. @@ -373,7 +379,10 @@ sub skip { last SKIP; } -=head2 C +=head2 C + + done_testing; + done_testing $count; See L. @@ -406,7 +415,10 @@ sub done_testing { return 1; } -=head2 C +=head2 C + + ok $ok; + ok $ok, $desc; See L. @@ -435,7 +447,10 @@ sub ok ($;$) { return $ok; } -=head2 C +=head2 C + + pass; + pass $desc; See L. @@ -446,7 +461,10 @@ sub pass (;$) { goto &ok; } -=head2 C +=head2 C + + fail; + fail $desc; See L. @@ -457,7 +475,10 @@ sub fail (;$) { goto &ok; } -=head2 C +=head2 C + + is $got, $expected; + is $got, $expected, $desc; See L. @@ -473,7 +494,10 @@ sub is ($$;$) { goto &ok; } -=head2 C +=head2 C + + isnt $got, $expected; + isnt $got, $expected, $desc; See L. @@ -560,11 +584,17 @@ IS_BINOP } } -=head2 C +=head2 C + + like $got, $regexp_expected; + like $got, $regexp_expected, $desc; See L. -=head2 C +=head2 C + + unlike $got, $regexp_expected; + unlike $got, $regexp_expected, $desc; See L. @@ -576,7 +606,10 @@ See L. *unlike = _create_binop_handler('!~'); } -=head2 C +=head2 C + + cmp_ok $got, $op, $expected; + cmp_ok $got, $op, $expected, $desc; See L. @@ -593,7 +626,10 @@ sub cmp_ok ($$$;$) { goto $handler; } -=head2 C +=head2 C + + is_deeply $got, $expected; + is_deeply $got, $expected, $desc; See L. @@ -735,7 +771,9 @@ sub _diag_fh { return 0; }; -=head2 C +=head2 C + + diag @lines; See L. @@ -746,7 +784,9 @@ sub diag { goto &_diag_fh; } -=head2 C +=head2 C + + note @lines; See L. @@ -757,7 +797,10 @@ sub note { goto &_diag_fh; } -=head2 C +=head2 C + + BAIL_OUT; + BAIL_OUT $desc; See L. @@ -802,7 +845,10 @@ END { L also provides some functions of its own, which are never exported. -=head2 C +=head2 C + + my $tap_fh = tap_stream; + tap_stream $fh; Read/write accessor for the filehandle to which the tests are outputted. On write, it also turns autoflush on onto C<$fh>. @@ -827,7 +873,10 @@ sub tap_stream (;*) { tap_stream *STDOUT; -=head2 C +=head2 C + + my $diag_fh = diag_stream; + diag_stream $fh; Read/write accessor for the filehandle to which the diagnostics are printed. On write, it also turns autoflush on onto C<$fh>.