Ticket #478 (closed bug: fixed)

Opened 13 years ago

Last modified 13 years ago

t/examples/pod.t skips docs/books

Reported by: coke Owned by: coke
Priority: normal Milestone:
Component: none Version: trunk
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

Because it was copied from t/codingstd/pod_syntax.t , this file currently relies on Parrot::Test::Pod, which apparently skips the books directory as written.

Either fix current usage to not skip any POD files that might contain examples (books being the biggest potential segment of that population), or ditch use of Parrot::Test::Pod, and just check everything in the MANIFEST.

Attachments

tt478.diff Download (1.6 KB) - added by coke 13 years ago.
Make second_analysis optional

Change History

  Changed 13 years ago by mikehh

One of the problems here is that docs/book uses additional POD formatting as in Pod::PseudoPod. The tests would require this package. There is Pod::PseudoPod::Checker.

I used the Pod::PseudoPod::HTML to generate .html files from the .pod in book and it allowed me to see some of the errors in the .pod files. One problem I found is that item* was not picked up as an error (should be item *) although it was pretty obvious browsing the generated files.

I will have a go at looking into this further.

Cheers Michael (mikehh)

  Changed 13 years ago by coke

FYI, I'm not checking the POD syntax with t/examples/pod.t - I'm checking the PIR syntax embedded in the POD. it doesn't have to be valid pod, it just has to have blocks like:

=begin PIR

.sub main
  say "hi"
.end

=end PIR

In fact, I'm not using a pod parser: I'm cheating and using a regular expression, so the rest of the file doesn't matter. =)

... t/codingstd/pod*.t can skip book because of the extras, that's fine.

in reply to: ↑ description   Changed 13 years ago by jkeenan

Replying to coke:

Because it was copied from t/codingstd/pod_syntax.t , this file currently relies on Parrot::Test::Pod, which apparently skips the books directory as written.

The provision against testing the POD in docs/book was present in both of the individual test files I refactored to create Parrot::Test::Pod. So we've actually been excluding those files from testing of POD validity for several years. As in other instances, when I refactored those tests my first objectives were to not change existing functionality and to not second-guess the original authors.

However, note that these files are excluded in the 'second pass' which the module takes at identifying the files needed for POD testing. I wrote (or, at least, intended to write) the module so that it would be extendable. Different ways of constructing the 'second pass' can be built for different purposes. You can probably construct one for your purpose by adding a key to %second_analysis_subs whose value would be an anonymous sub that accomplishes what you want.

Either fix current usage to not skip any POD files that might contain examples (books being the biggest potential segment of that population), or ditch use of Parrot::Test::Pod, and just check everything in the MANIFEST.

Checking everything in the MANIFEST would not be the way to go because, for a variety of purposes, we have several files in the distribution with deliberately malformed POD.

Thank you very much.
kid51

Changed 13 years ago by coke

Make second_analysis optional

  Changed 13 years ago by coke

Attached a patch to make second_analysis optional, which gives me what I want: everything.

  Changed 13 years ago by coke

  • owner set to coke

Applied in r37603.

  Changed 13 years ago by coke

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.