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

coke at svn.parrot.org coke at svn.parrot.org
Sat Mar 28 15:14:10 UTC 2009


Author: coke
Date: Sat Mar 28 15:14:09 2009
New Revision: 37801
URL: https://trac.parrot.org/parrot/changeset/37801

Log:
[t] .* matches \s* - fix up boilerplate check. fixup ARG check slightly.

Modified:
   trunk/t/codingstd/c_function_docs.t

Modified: trunk/t/codingstd/c_function_docs.t
==============================================================================
--- trunk/t/codingstd/c_function_docs.t	Sat Mar 28 14:41:26 2009	(r37800)
+++ trunk/t/codingstd/c_function_docs.t	Sat Mar 28 15:14:09 2009	(r37801)
@@ -48,7 +48,7 @@
         $function_decl =~ s/^\s*PARROT_[A-Z_]*\b\s+//gm;
 
         # strip out any ARG* modifiers
-        $function_decl =~ s/ARG(?:IN|MOD)(?:_NULLOK)?\((.*?)\)/$1/g;
+        $function_decl =~ s/ARG(?:IN|IN_NULLOK|OUT|MOD)\((.*?)\)/$1/g;
 
         # strip out the SHIM modifier
         $function_decl =~ s/SHIM\((.*?)\)/$1/g;
@@ -69,15 +69,16 @@
         # it and the documented function doesn't.
         $escaped_decl =~ s/\s+/\\s+/g;
 
-        my $decl_rx_content = qr/^=item C<$escaped_decl>(.*?)^=cut/sm;
-        my $decl_rx_ws_only = qr/^=item C<$escaped_decl>\s+^=cut/sm;
+        my $decl_rx = qr/^=item C<$escaped_decl>(.*?)^=cut/sm;
 
         my $missing = '';
-        if ( $buf =~ m/$decl_rx_content/ ) {
-            # yay, docs!
-        }
-        elsif ($buf =~ $decl_rx_ws_only) {
-            $missing = 'boilerplate only';
+        if ( $buf =~ m/$decl_rx/) {
+            my $docs = $1;
+            $docs =~ s/\s//g;
+            if ($docs eq '') {
+                $missing = 'boilerplate only';
+            }
+            # else:  docs!
         }
         else {
             $missing = 'missing'; 


More information about the parrot-commits mailing list