Hello Hugo, please find answers in the text below.
Cheers, Marek > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > I had a go at integrating this into the core, but ran across some > test failures. > > First, the core version of t/pod/find.t is substantially different > from the one in the distribution. That's kinda understandable, since > the one in the distribution thinks it knows all the files it should > find in ../lib, but the core version is also doing some strange > things; I don't understand this comment or code at all: > # The ../../../../../lib is for finding lib/utf8.pm > # when running under all-utf8 settings (pod/find.t) > # does not directly require lib/utf8.pm but regular > # expressions will need that. > @INC = qw(../lib ../../../../../lib); > > I think in an ideal world the test in the distribution would work > a bit better in isolation (perhaps by generating its own test files, > or something), and if necessary check whether it is running as part > of the core or standalone by checking $ENV{PERL_CORE}. However the > current core version still passes all tests even with the latest code, > and we could just leave it there for now if this isn't an easy fix. Hmmm, never saw that one. Do I get it right that this is for TESTING Pod/* WITHIN the Perl core? If so, the setting above in the *.t test script seems ok for me. The *.pm shouldn't contain such code. For the next update I can include sth. like if($ENV{PERL_CORE}) { @INC = (@INC, qw(../lib ../../../../../lib); } to t/pod/find.t - would that be ok? Are there other things that should be included in the distribution t/pod/find.t? I don't mind encapsulating all of them in if-PERL_CORE clauses. Maybe will have a look at the Perl core myself, if time permits. > The other test failures are in lib/Pod/t/*: > > crypt.org% ( cd t ; ./perl harness ../lib/Pod/t/{latex,utils}.t ) > ../lib/Pod/t/latex....NOK 76# Test 76 got: 'Standard link: > \emph{Pod::LaTeX}. > ' (../lib/Pod/t/latex.t at line 63 fail #73) > # Expected: 'Standard link: the \emph{Pod::LaTeX} manpage. > ' > # ../lib/Pod/t/latex.t line 63 is: ok($output$i, $reference$i); > ../lib/Pod/t/latex....NOK 80# Test 80 got: 'Now refer to an > external section: \textsf{sec} in \emph{Pod::LaTeX} > ' (../lib/Pod/t/latex.t at line 63 fail #77) > # Expected: 'Now refer to an external section: the section > on \textsf{sec} in the \emph{Pod::LaTeX} manpage > ' > ../lib/Pod/t/latex....FAILED tests 76, 80 > > Failed 2/154 tests, 98.70% okay > ../lib/Pod/t/utils....# Test 2 got: 'P<name>' > (../lib/Pod/t/utils.t at line 46) > # Expected: 'the P<name> manpage' > # ../lib/Pod/t/utils.t line 46 is: ok($link->markup, $results$i); > # Test 3 got: 'Q<ident> in P<name>' (../lib/Pod/t/utils.t at > line 46 fail #2) > # Expected: 'the Q<ident> entry in the P<name> manpage' > # Test 4 got: 'Q<sec> in P<name>' (../lib/Pod/t/utils.t at > line 46 fail #3) > # Expected: 'the section on Q<sec> in the P<name> manpage' > # Test 5 got: 'Q<sec>' (../lib/Pod/t/utils.t at line 46 fail #4) > # Expected: 'the section on Q<sec> elsewhere in this document' > # Test 6 got: 'Q<sec>' (../lib/Pod/t/utils.t at line 46 fail #5) > # Expected: 'the section on Q<sec> elsewhere in this document' > ../lib/Pod/t/utils....FAILED tests 2-6 > > Failed 5/22 tests, 77.27% okay > Failed Test Stat Wstat Total Fail Failed List of Failed > -------------------------------------------------------------- > ----------------- > ../lib/Pod/t/latex.t 154 2 1.30% 76 80 > ../lib/Pod/t/utils.t 22 5 22.73% 2-6 > Failed 2/2 test scripts, 0.00% okay. 7/176 subtests failed, > 96.02% okay. > crypt.org% > > .. and I'm not sure whether we should just change the tests, > or whether > they have a right to expect the text they did. All of these are ok - the test references should be updated accordingly. This is because of the new perlpodspec: POD links like L<Pod::Find/"SYNOPSIS"> should be expanded to "SYNOPSIS" in Pod::Find as "in" is quite understandable in many (western) languages. The prior expansion adds too much english text. Cheers, Marek
