[svn:parrot] r36710 - in branches/update_pod: config/gen/makefiles t/codingstd
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sat Feb 14 02:24:20 UTC 2009
Author: jkeenan
Date: Sat Feb 14 02:24:19 2009
New Revision: 36710
URL: https://trac.parrot.org/parrot/changeset/36710
Log:
Rename sub in pod.t to be more self-documenting. Write result to disk via
Storable. Make entry in test-clean target more flexible.
Modified:
branches/update_pod/config/gen/makefiles/root.in
branches/update_pod/t/codingstd/pod.t
Modified: branches/update_pod/config/gen/makefiles/root.in
==============================================================================
--- branches/update_pod/config/gen/makefiles/root.in Sat Feb 14 00:56:28 2009 (r36709)
+++ branches/update_pod/config/gen/makefiles/root.in Sat Feb 14 02:24:19 2009 (r36710)
@@ -1717,7 +1717,7 @@
"test.*"
$(RM_F) \
"parrot_test_run.tar.gz" \
- ".pod_examinable.sto"
+ ".pod_examinable*.sto"
imcc-clean:
$(RM_F) \
Modified: branches/update_pod/t/codingstd/pod.t
==============================================================================
--- branches/update_pod/t/codingstd/pod.t Sat Feb 14 00:56:28 2009 (r36709)
+++ branches/update_pod/t/codingstd/pod.t Sat Feb 14 02:24:19 2009 (r36710)
@@ -8,6 +8,7 @@
use Carp;
use Test::More;
use ExtUtils::Manifest qw(maniread);
+use Storable qw(nstore retrieve);
use lib qw( lib );
use Parrot::Config;
use Parrot::Test::Pod::Util qw(
@@ -44,7 +45,7 @@
manifest => $manifest,
manifest_gen => $manifest_gen,
build_dir => $build_dir,
- second_analysis => \&second_analysis,
+ second_analysis => \&oreilly_summary_malformed,
} );
my (@failed_syntax, @empty_description);
@@ -85,34 +86,47 @@
#################### SUBROUTINES ####################
-sub second_analysis {
+sub oreilly_summary_malformed {
my ($files_needing_analysis, $build_dir) = @_;
- SECOND_FILE: foreach my $file ( keys %{ $files_needing_analysis } ) {
- my $full_file = qq|$build_dir/$file|;
-
- # Skip the book, because it uses extended O'Reilly-specific POD
- if ($full_file =~ m{docs/book/}) {
- delete $files_needing_analysis->{ $file };
- next SECOND_FILE;
+ my $sto = q{.pod_examinable_oreilly_summary_malformed.sto};
+ if ( -e $sto ) {
+ eval { $files_needing_analysis = retrieve($sto) };
+ if ($@) {
+ croak "$sto exists on disk but could not retrieve from it";
}
-
- # skip POD generating scripts
- if ($full_file =~ m/ops_summary\.pl/) {
- delete $files_needing_analysis->{ $file };
- next SECOND_FILE;
+ else {
+ return $files_needing_analysis;
}
-
- # skip file which includes malformed POD for other testing purposes
- if ($full_file =~ m{
- t/tools/dev/searchops/samples\.pm
- |
- languages/pod/test\.pod
- }x
- ) {
- delete $files_needing_analysis->{ $file };
- next SECOND_FILE;
+ }
+ else {
+ SECOND_FILE: foreach my $file ( keys %{ $files_needing_analysis } ) {
+ my $full_file = qq|$build_dir/$file|;
+
+ # Skip the book, because it uses extended O'Reilly-specific POD
+ if ($full_file =~ m{docs/book/}) {
+ delete $files_needing_analysis->{ $file };
+ next SECOND_FILE;
+ }
+
+ # skip POD generating scripts
+ if ($full_file =~ m/ops_summary\.pl/) {
+ delete $files_needing_analysis->{ $file };
+ next SECOND_FILE;
+ }
+
+ # skip file which includes malformed POD for other testing purposes
+ if ($full_file =~ m{
+ t/tools/dev/searchops/samples\.pm
+ |
+ languages/pod/test\.pod
+ }x
+ ) {
+ delete $files_needing_analysis->{ $file };
+ next SECOND_FILE;
+ }
}
}
+ nstore $files_needing_analysis, $sto;
return $files_needing_analysis;
}
More information about the parrot-commits
mailing list