[svn:parrot] r45016 - trunk/t/codingstd

Util at svn.parrot.org Util at svn.parrot.org
Thu Mar 18 17:54:50 UTC 2010


Author: Util
Date: Thu Mar 18 17:54:49 2010
New Revision: 45016
URL: https://trac.parrot.org/parrot/changeset/45016

Log:
[t] pdd_format.t - Changed error message to report relative path, for editing

Modified:
   trunk/t/codingstd/pdd_format.t

Modified: trunk/t/codingstd/pdd_format.t
==============================================================================
--- trunk/t/codingstd/pdd_format.t	Thu Mar 18 16:43:18 2010	(r45015)
+++ trunk/t/codingstd/pdd_format.t	Thu Mar 18 17:54:49 2010	(r45016)
@@ -7,13 +7,11 @@
 
 use Test::More tests =>  1;
 use Carp;
-use Cwd;
 use Tie::File;
 
-my $cwd = cwd();
-my @pdddirs = (
-    qq{$cwd/docs/pdds},
-    qq{$cwd/docs/pdds/draft},
+my @pdddirs = qw(
+    ./docs/pdds
+    ./docs/pdds/draft
 );
 
 my @pddfiles = ();
@@ -44,10 +42,7 @@
 
 sub check_pdd_formatting {
     my $pdd = shift;
-    my $base = $pdd;
-    if ($pdd =~ m{((draft/)?[^/]+)$}) {
-        $base = $1;
-    }
+
     my $diag = q{};
     my @toolong = ();
     my @sections_needed = qw(
@@ -76,13 +71,13 @@
     untie @lines or croak "Unable to untie from $pdd: $!";
     if ( @toolong ) {
         $diag .=
-            qq{$base has } .
+            qq{$pdd has } .
             scalar(@toolong) .
             qq{ lines > 78 chars:  @toolong\n};
     }
     foreach my $need (@sections_needed) {
         if ( ! $sections_seen{$need} ) {
-            $diag .= qq{$base lacks 'head2' $need section\n};
+            $diag .= qq{$pdd lacks 'head2' $need section\n};
         }
     }
     return $diag;


More information about the parrot-commits mailing list