Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #37100] [PATCH] Pod tests + fixes

0 views
Skip to first unread message

Joshua Hoblitt

unread,
Sep 7, 2005, 5:29:40 PM9/7/05
to bugs-bi...@rt.perl.org
# New Ticket Created by Joshua Hoblitt
# Please include the string: [perl #37100]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37100 >


This patch adds a new test, t/docs/pod.t, that scans through the parrot
tree and checks the Pod syntax of all files identified by Pod::Find as
containing Pod markup. This is invoked by a new test target named
"doc_tests" which has been added to the "fulltest" target. This patch
also fixes all of the syntax errors currently found by the new test.

MANIFEST | 1 +
charset/gen_tables.pl | 4 ++++
config/gen/makefiles/root.in | 7 ++++++-
docs/pdds/pdd04_datatypes.pod | 4 ----
docs/pdds/pdd09_gc.pod | 4 ++--
lib/Test/More.pm | 3 +++
ops/pic.ops | 4 ++--
t/doc/pod.t | 29 +++++++++++++++++++++++++++++
8 files changed, 47 insertions(+), 9 deletions(-)

docs-pod_tests+fixes.patch

Bernhard Schmalhofer via RT

unread,
Sep 8, 2005, 3:12:18 PM9/8/05
to perl6-i...@perl.org
> [jhob...@ifa.hawaii.edu - Mi 07. Sep 2005, 14:29:39]:

>
> This patch adds a new test, t/docs/pod.t, that scans through the parrot
> tree and checks the Pod syntax of all files identified by Pod::Find as
> containing Pod markup. This is invoked by a new test target named
> "doc_tests" which has been added to the "fulltest" target. This patch
> also fixes all of the syntax errors currently found by the new test.

Hi,

I have applied the POD syntax fixes of this patch.

't/doc/pod.t' also make a lot of sense. However could you comment on the
relation to t/perl/Parrot_Docs.t ? It looks like it checks the same
things as 'pod.t'.
I wonder whether it is worthwile to maintain Parrot::Docs, when the
needed functionality is already at CPAN.

CU, Bernhard

> MANIFEST | 1 +
> charset/gen_tables.pl | 4 ++++
> config/gen/makefiles/root.in | 7 ++++++-
> docs/pdds/pdd04_datatypes.pod | 4 ----
> docs/pdds/pdd09_gc.pod | 4 ++--
> lib/Test/More.pm | 3 +++
> ops/pic.ops | 4 ++--
> t/doc/pod.t | 29 +++++++++++++++++++++++++++++
> 8 files changed, 47 insertions(+), 9 deletions(-)
>
>

--
/* Bernhard.S...@gmx.de */

Joshua Hoblitt

unread,
Sep 8, 2005, 8:52:32 PM9/8/05
to Bernhard Schmalhofer via RT, perl6-i...@perl.org, sbu...@cpan.org
On Thu, Sep 08, 2005 at 12:12:18PM -0700, Bernhard Schmalhofer via RT wrote:
> 't/doc/pod.t' also make a lot of sense. However could you comment on the
> relation to t/perl/Parrot_Docs.t ? It looks like it checks the same
> things as 'pod.t'.
> I wonder whether it is worthwile to maintain Parrot::Docs, when the
> needed functionality is already at CPAN.

I completely missed the fact that Parrot_Docs.t even existed, DOH!
Although, it looks like there would be no duplication of testing. The
pod.t file I submitted searches through the entire parrot tree and test
the format of the all Pod containing files. While Parrot_Docs.t
contains regression tests for the Parrot::Docs::* collection of modules.

As to whether or not it's worth the effort to maintain the in tree pod
checking modules, I'd say that boils down to: Is Pod::Simple (used by
Test::Pod) as or more rigorous than the checking done by
Parrot::Docs::File. Perhaps Sean Burke can take a look at the code and
comment?

Cheers,

-J

--

Joshua Hoblitt

unread,
Sep 9, 2005, 5:38:55 PM9/9/05
to Bernhard Schmalhofer via RT
On Fri, Sep 09, 2005 at 02:26:04PM -0700, Bernhard Schmalhofer via RT wrote:
> > [jhob...@ifa.hawaii.edu - Fr 09. Sep 2005, 02:15:03]:

> >
> > I completely missed the fact that Parrot_Docs.t even existed, DOH!
> > Although, it looks like there would be no duplication of testing. The
> > pod.t file I submitted searches through the entire parrot tree and test
> > the format of the all Pod containing files. While Parrot_Docs.t
> > contains regression tests for the Parrot::Docs::* collection of modules.
>
> I have committed the new test 't/doc/pod.t'.

Great. Were the make targets left out on purpose?

-J

--

Joshua Hoblitt

unread,
Sep 9, 2005, 6:00:26 PM9/9/05
to Bernhard Schmalhofer via RT

Nevermind. I can see the changes now.

-J

--

Bernhard Schmalhofer

unread,
Sep 10, 2005, 7:23:01 AM9/10/05
to Joshua Hoblitt, Bernhard Schmalhofer via RT
Joshua Hoblitt schrieb:

Hi,

the changes to 'root.in' show up in Makefile only after 'perl Configure.pl'.

In ticket 37104 you mentioned spell checking with 'aspell'. Did you
encounter words
that were not in the aspell-en 6.0.0 dictionary? If so it could be
worthwile to a special aspell-dictionary to the Parrot distribution and
add a spelling test target.
Also some terms for 'glossary.pod' might crop up.

CU, Bernhard

Joshua Hoblitt

unread,
Sep 12, 2005, 3:48:26 PM9/12/05
to Bernhard Schmalhofer, Bernhard Schmalhofer via RT
On Sat, Sep 10, 2005 at 01:23:01PM +0200, Bernhard Schmalhofer wrote:
> In ticket 37104 you mentioned spell checking with 'aspell'. Did you
> encounter words
> that were not in the aspell-en 6.0.0 dictionary? If so it could be
> worthwile to a special aspell-dictionary to the Parrot distribution and
> add a spelling test target.
> Also some terms for 'glossary.pod' might crop up.

I did encounter a large number of words that weren't in the aspell-en
dictionary. Unfortunately, I didn't save them out to a separate file.
I've tried to separate the parrot specific words from all the other junk
in my personal words list with this code snippet.

--
open(my $wlist, "$ENV{HOME}/.aspell.en.pws") or die "can't open file: $!";

foreach my $word (<$wlist>) {
chomp $word;
my @matches = File::Find::Rule->file
->grep( qr/\b$word\b/ )
->in( './docs' );
print "$word\n" if scalar @matches;
}

close($wlist) or die "can't close file: $!";
--

The results (sorted) are attached.

A spelling test target is a good idea, I'll throw something together
when I have a chance.

Cheers,

-J

--

parrot_words.txt
0 new messages