develooper Front page | perl.cvs.parrot | Postings from January 2009

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

From:
bernhard
Date:
January 19, 2009 05:27
Subject:
[svn:parrot] r35750 - trunk/t/codingstd
Message ID:
20090119132718.33BA0CB9AE@x12.develooper.com
Author: bernhard
Date: Mon Jan 19 05:27:17 2009
New Revision: 35750

Modified:
   trunk/t/codingstd/svn_id.t

Log:
[codingstd] unexpanded SVN tags are OK for git-svn users and for new
files

Modified: trunk/t/codingstd/svn_id.t
==============================================================================
--- trunk/t/codingstd/svn_id.t	(original)
+++ trunk/t/codingstd/svn_id.t	Mon Jan 19 05:27:17 2009
@@ -1,13 +1,13 @@
 #! perl
-# Copyright (C) 2007, The Perl Foundation.
+# Copyright (C) 2007-2009, The Perl Foundation.
 # $Id$
 
 use strict;
 use warnings;
-
 use lib qw( . lib ../lib ../../lib );
+
 use Parrot::Distribution;
-use Test::More tests => 1;
+use Test::More            tests => 1;
 
 =head1 NAME
 
@@ -43,8 +43,6 @@
 my @files = @ARGV ? @ARGV : @all_files;
 my @no_id_files;
 
-my $id_line = '\$Id:.*\$';
-
 foreach my $file (@files) {
 
     # if we have command line arguments, the file is the full path
@@ -55,7 +53,13 @@
 
     my $buf = $DIST->slurp($path);
 
-    if ( $buf !~ m{$id_line}m ) {
+    if ( $buf !~ m/\$Id
+                   (?:
+                    \$       # unexpanded tag, for git-svn users or for new files
+                    |
+                    :.*\$    # expanded tag, colon required
+                   )
+                  /xm ) {
         push @no_id_files, $path;
         next;
     }



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About