[svn:parrot] r36713 - in branches/update_pod: . lib/Parrot/Harness t/codingstd
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sat Feb 14 03:53:48 UTC 2009
Author: jkeenan
Date: Sat Feb 14 03:53:46 2009
New Revision: 36713
URL: https://trac.parrot.org/parrot/changeset/36713
Log:
Rename pod.t to pod_description.t to reflect fact that test of POD syntax has
been moved to another file. Update svn:ignore properties to include
.pod_examinable*.stor files. Update list of test files skipped for 'make
codetest'.
Added:
branches/update_pod/t/codingstd/pod_description.t
- copied, changed from r36711, branches/update_pod/t/codingstd/pod.t
Deleted:
branches/update_pod/t/codingstd/pod.t
Modified:
branches/update_pod/MANIFEST
branches/update_pod/MANIFEST.SKIP
branches/update_pod/lib/Parrot/Harness/DefaultTests.pm
Modified: branches/update_pod/MANIFEST
==============================================================================
--- branches/update_pod/MANIFEST Sat Feb 14 03:32:50 2009 (r36712)
+++ branches/update_pod/MANIFEST Sat Feb 14 03:53:46 2009 (r36713)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Sat Feb 14 03:16:53 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sat Feb 14 03:33:21 2009 UT
#
# See tools/dev/install_files.pl for documentation on the
# format of this file.
@@ -2822,7 +2822,7 @@
t/codingstd/pdd_format.t []
t/codingstd/perlcritic.t []
t/codingstd/pir_code_coda.t []
-t/codingstd/pod.t []
+t/codingstd/pod_description.t []
t/codingstd/pod_syntax.t []
t/codingstd/pod_todo.t []
t/codingstd/svn_id.t []
Modified: branches/update_pod/MANIFEST.SKIP
==============================================================================
--- branches/update_pod/MANIFEST.SKIP Sat Feb 14 03:32:50 2009 (r36712)
+++ branches/update_pod/MANIFEST.SKIP Sat Feb 14 03:53:46 2009 (r36713)
@@ -1,6 +1,6 @@
# ex: set ro:
# $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Tue Feb 10 19:40:38 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sat Feb 14 03:33:21 2009 UT
#
# This file should contain a transcript of the svn:ignore properties
# of the directories in the Parrot subversion repository. (Needed for
@@ -51,6 +51,8 @@
^\.git/
^\.parrot_current_rev$
^\.parrot_current_rev/
+^\.pod_examinable.*\.sto$
+^\.pod_examinable.*\.sto/
^CFLAGS$
^CFLAGS/
^MANIFEST\.configure\.generated$
Modified: branches/update_pod/lib/Parrot/Harness/DefaultTests.pm
==============================================================================
--- branches/update_pod/lib/Parrot/Harness/DefaultTests.pm Sat Feb 14 03:32:50 2009 (r36712)
+++ branches/update_pod/lib/Parrot/Harness/DefaultTests.pm Sat Feb 14 03:53:46 2009 (r36713)
@@ -86,7 +86,7 @@
@developing_tests = ( 't/distro/file_metadata.t' );
# Add in all t/codingstd except for a few skips.
push @developing_tests,
- grep { ! m/(c_function_docs|fixme|pod|pod_todo|opcode-doc)\.t$/ }
+ grep { ! m/(c_function_docs|fixme|pod_description|pod_todo|opcode-doc)\.t$/ }
glob 't/codingstd/*.t';
sub get_default_tests {
Deleted: branches/update_pod/t/codingstd/pod.t
==============================================================================
--- branches/update_pod/t/codingstd/pod.t Sat Feb 14 03:53:46 2009 (r36712)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,141 +0,0 @@
-#! perl
-# Copyright (C) 2001-2009, The Perl Foundation.
-# $Id$
-
-use strict;
-use warnings;
-
-use Carp;
-use Test::More;
-use ExtUtils::Manifest qw(maniread);
-use lib qw( lib );
-use Parrot::Config;
-use Parrot::Test::Pod::Util qw(
- identify_files_for_POD_testing
- oreilly_summary_malformed
-);
-
-BEGIN {
- eval 'use Pod::Simple';
- if ($@) {
- plan skip_all => 'Pod::Simple not installed';
- exit;
- }
-}
-
-plan tests => 2;
-
-# RT #44437 this should really be using src_dir instead of build_dir but it
-# does not exist (yet)
-my $build_dir = $PConfig{build_dir};
-#print STDERR $build_dir, "\n";
-
-croak "Cannot run test if build_dir does not yet exist"
- unless -d $build_dir;
-croak "Test cannot be run unless MANIFEST exists in build dir"
- unless -f "$build_dir/MANIFEST";
-croak "Test cannot be run unless MANIFEST exists in build dir"
- unless -f "$build_dir/MANIFEST.generated";
-
-my $manifest = maniread("$build_dir/MANIFEST");
-my $manifest_gen = maniread("$build_dir/MANIFEST.generated");
-
-my $need_testing_ref = identify_files_for_POD_testing( {
- argv => [ @ARGV ],
- manifest => $manifest,
- manifest_gen => $manifest_gen,
- build_dir => $build_dir,
- second_analysis => \&oreilly_summary_malformed,
-} );
-
-my (@failed_syntax, @empty_description);
-
-foreach my $file ( @{ $need_testing_ref } ) {
- # skip files with valid POD
- if (file_pod_ok($file)) {
- #check DESCRIPTION section on valid POD files
- push @empty_description, $file if empty_description($file);
- }
- else {
- # report whatever is not skipped
- push @failed_syntax, $file;
- }
-}
-
-my $bad_syntax_files = join( "\n", @failed_syntax );
-my $empty_description_files = join( "\n", @empty_description);
-my $nempty_description = scalar( @empty_description );
-
-# only ok if everything passed
-is( $bad_syntax_files, q{}, 'Pod syntax correct' );
-
-TODO: {
- local $TODO = "not quite done yet";
- is(
- $empty_description_files,
- q{},
- 'All Pod files have non-empty DESCRIPTION sections'
- );
-}
-
-diag("You should use podchecker to check the failed files.\n")
- if $bad_syntax_files;
-
-diag("Found $nempty_description files without DESCRIPTION sections.\n")
- if $nempty_description;
-
-#################### SUBROUTINES ####################
-
-# Pulled from Test::Pod
-sub file_pod_ok {
- my $file = shift;
- my $checker = Pod::Simple->new;
-
- $checker->output_string( \my $trash ); # Ignore any output
- $checker->parse_file($file);
-
- return !$checker->any_errata_seen;
-}
-
-sub empty_description {
- my $file = shift;
-
- use Pod::Simple::PullParser;
- my $parser = Pod::Simple::PullParser->new;
- $parser->set_source( $file );
- my $description = $parser->get_description;
-
- if ( $description =~ m{^\s*$}m ) {
- return 1;
- }
-
- return 0;
-}
-
-=head1 NAME
-
-t/codingstd/pod.t - Pod document syntax tests
-
-=head1 SYNOPSIS
-
- # test all files
- % prove t/codingstd/pod.t
-
- # test specific files
- % perl t/codingstd/pod.t perl_module.pm perl_file.pl
-
-=head1 DESCRIPTION
-
-Tests the Pod syntax for all files listed in F<MANIFEST> and
-F<MANIFEST.generated> that appear to contain Pod markup. If any files
-contain invalid POD markup, they are reported in the test output.
-Use C<podchecker> to ferret out individual issues.
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Copied and modified: branches/update_pod/t/codingstd/pod_description.t (from r36711, branches/update_pod/t/codingstd/pod.t)
==============================================================================
--- branches/update_pod/t/codingstd/pod.t Sat Feb 14 03:11:54 2009 (r36711, copy source)
+++ branches/update_pod/t/codingstd/pod_description.t Sat Feb 14 03:53:46 2009 (r36713)
@@ -23,7 +23,7 @@
}
}
-plan tests => 2;
+plan tests => 1;
# RT #44437 this should really be using src_dir instead of build_dir but it
# does not exist (yet)
@@ -48,27 +48,19 @@
second_analysis => \&oreilly_summary_malformed,
} );
-my (@failed_syntax, @empty_description);
+my @empty_description;
foreach my $file ( @{ $need_testing_ref } ) {
# skip files with valid POD
- if (file_pod_ok($file)) {
- #check DESCRIPTION section on valid POD files
- push @empty_description, $file if empty_description($file);
- }
- else {
- # report whatever is not skipped
- push @failed_syntax, $file;
+ #check DESCRIPTION section on valid POD files
+ if ( file_pod_ok($file) and empty_description($file) ) {
+ push @empty_description, $file;
}
}
-my $bad_syntax_files = join( "\n", @failed_syntax );
-my $empty_description_files = join( "\n", @empty_description);
+my $empty_description_files = join( "\n", sort @empty_description);
my $nempty_description = scalar( @empty_description );
-# only ok if everything passed
-is( $bad_syntax_files, q{}, 'Pod syntax correct' );
-
TODO: {
local $TODO = "not quite done yet";
is(
@@ -78,9 +70,6 @@
);
}
-diag("You should use podchecker to check the failed files.\n")
- if $bad_syntax_files;
-
diag("Found $nempty_description files without DESCRIPTION sections.\n")
if $nempty_description;
@@ -112,24 +101,23 @@
return 0;
}
-=head1 NAME
+=head1 t/codingstd/pod_description.t
-t/codingstd/pod.t - Pod document syntax tests
+Identify files lacking 'Description' section in their POD
-=head1 SYNOPSIS
+=head2 SYNOPSIS
# test all files
- % prove t/codingstd/pod.t
+ % prove t/codingstd/pod_description.t
# test specific files
- % perl t/codingstd/pod.t perl_module.pm perl_file.pl
+ % perl t/codingstd/pod_description.t perl_module.pm perl_file.pl
-=head1 DESCRIPTION
+=head2 DESCRIPTION
Tests the Pod syntax for all files listed in F<MANIFEST> and
F<MANIFEST.generated> that appear to contain Pod markup. If any files
-contain invalid POD markup, they are reported in the test output.
-Use C<podchecker> to ferret out individual issues.
+contain with valid POD markup lack C<DESCRIPTION> sections, list them.
=cut
More information about the parrot-commits
mailing list