Author: jkeenan
Date: Tue Mar 27 18:15:57 2007
New Revision: 17798

Modified:
   branches/reconfigure/t/configure/components/01-options.t
   branches/reconfigure/t/configure/components/02-messages.t

Log:
POD corrections.

Modified: branches/reconfigure/t/configure/components/01-options.t
==============================================================================
--- branches/reconfigure/t/configure/components/01-options.t    (original)
+++ branches/reconfigure/t/configure/components/01-options.t    Tue Mar 27 
18:15:57 2007
@@ -22,13 +22,54 @@
 use Test::More qw(no_plan); # tests => 10;
 use Carp;
 use Data::Dumper;
-use_ok('Parrot::Configure::Options', qw| process_options | );
+use_ok('Parrot::Configure::Options', qw|
+    process_options
+    get_valid_options
+| );
 use_ok("Parrot::IO::Capture::Mini");
 
+
+my %valid;
+%valid = map {$_, 1} get_valid_options();
+ok(scalar keys %valid, "non-zero quantity of valid options found");
+ok(defined $valid{debugging}, "debugging option found");
+ok(defined $valid{maintainer}, "maintainer option found");
+ok(defined $valid{help}, "help option found");
+ok(defined $valid{version}, "version option found");
+ok(defined $valid{verbose}, "verbose option found");
+
+open my $FH, "$main::topdir/Configure.pl"
+    or croak "Unable to open handle to Configure.pl";
+my $bigstr;
+{
+    local $/ = undef;
+    $bigstr = <$FH>;
+}
+close $FH or croak "Unable to close handle to Configure.pl";
+
+# Ignore any POD I have moved to an __END__ block.
+$bigstr =~ s/__END__.*//s;
+my (@lines, @possible_methods);
[EMAIL PROTECTED] = grep { /^=item/ } (split /\n/, $bigstr);
+foreach my $l (@lines) {
+    my $method;
+    if ($l =~ /^=item C<--([-_\w]+)(?:[=>])/) {
+        $method = $1;
+        push @possible_methods, $method;
+    }
+}
+my $invalid = 0;
+foreach my $m (@possible_methods) {
+    unless (defined $valid{$m}) {
+        carp "Possibly invalid method: $m";
+        $invalid++;
+    }
+}
+ok(! $invalid, "No invalid methods described in POD");
+
 my $parrot_version = '0.4.10';
 my $svnid = '$Id: Configure.pl 17734 2007-03-25 16:39:07Z jkeenan $';
 my ($args);
-
 $args = process_options( {
     argv            => [],
     script          => $0,

Modified: branches/reconfigure/t/configure/components/02-messages.t
==============================================================================
--- branches/reconfigure/t/configure/components/02-messages.t   (original)
+++ branches/reconfigure/t/configure/components/02-messages.t   Tue Mar 27 
18:15:57 2007
@@ -1,7 +1,7 @@
 #! perl
 # Copyright (C) 2007, The Perl Foundation.
 # $Id$
-# 01-messages.t
+# 02-messages.t
 
 use strict;
 use warnings;
@@ -76,11 +76,11 @@
 
 =head1 NAME
 
-01-messages.t - test Parrot::Configure::Messages
+02-messages.t - test Parrot::Configure::Messages
 
 =head1 SYNOPSIS
 
-    % prove t/configure/components/01-messages.t
+    % prove t/configure/components/02-messages.t
 
 =head1 DESCRIPTION
 

Reply via email to