[svn:parrot] r37325 - in trunk: . lib/Parrot/Harness t/codingstd

coke at svn.parrot.org coke at svn.parrot.org
Wed Mar 11 20:20:59 UTC 2009


Author: coke
Date: Wed Mar 11 20:20:58 2009
New Revision: 37325
URL: https://trac.parrot.org/parrot/changeset/37325

Log:
rename test file; 
- we already have a pod_todo, and several c_* files; follow their lead.

Added:
   trunk/t/codingstd/c_todo.t
      - copied, changed from r37315, trunk/t/codingstd/fixme.t
Deleted:
   trunk/t/codingstd/fixme.t
Modified:
   trunk/MANIFEST
   trunk/lib/Parrot/Harness/DefaultTests.pm

Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST	Wed Mar 11 20:04:01 2009	(r37324)
+++ trunk/MANIFEST	Wed Mar 11 20:20:58 2009	(r37325)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Wed Mar 11 19:32:06 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Wed Mar 11 20:08:16 2009 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -1999,12 +1999,12 @@
 t/codingstd/c_parens.t                                      [test]
 t/codingstd/c_returns.t                                     [test]
 t/codingstd/c_struct.t                                      [test]
+t/codingstd/c_todo.t                                        [test]
 t/codingstd/check_isxxx.t                                   [test]
 t/codingstd/check_toxxx.t                                   [test]
 t/codingstd/copyright.t                                     [test]
 t/codingstd/cuddled_else.t                                  [test]
 t/codingstd/filenames.t                                     [test]
-t/codingstd/fixme.t                                         [test]
 t/codingstd/gmt_utc.t                                       [test]
 t/codingstd/linelength.t                                    [test]
 t/codingstd/make_code_coda.t                                [test]

Modified: trunk/lib/Parrot/Harness/DefaultTests.pm
==============================================================================
--- trunk/lib/Parrot/Harness/DefaultTests.pm	Wed Mar 11 20:04:01 2009	(r37324)
+++ trunk/lib/Parrot/Harness/DefaultTests.pm	Wed Mar 11 20:20:58 2009	(r37325)
@@ -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_description|pod_todo)\.t$/ }
+  grep { ! m/(c_function_docs|c_todo|pod_description|pod_todo)\.t$/ }
   glob 't/codingstd/*.t';
 
 sub get_default_tests {

Copied and modified: trunk/t/codingstd/c_todo.t (from r37315, trunk/t/codingstd/fixme.t)
==============================================================================
--- trunk/t/codingstd/fixme.t	Wed Mar 11 19:09:11 2009	(r37315, copy source)
+++ trunk/t/codingstd/c_todo.t	Wed Mar 11 20:20:58 2009	(r37325)
@@ -10,15 +10,15 @@
 
 =head1 NAME
 
-t/codingstd/fixme.t - checks for "FIXME" and similar notes in C source and headers
+t/codingstd/c_todo.t - checks for "FIXME" and similar notes in C source and headers
 
 =head1 SYNOPSIS
 
     # test all files
-    % prove t/codingstd/fixme.t
+    % prove t/codingstd/c_todo.t
 
     # test specific files
-    % perl t/codingstd/fixme.t src/foo.c include/parrot/bar.h
+    % perl t/codingstd/c_todo.t src/foo.c include/parrot/bar.h
 
 =head1 DESCRIPTION
 

Deleted: trunk/t/codingstd/fixme.t
==============================================================================
--- trunk/t/codingstd/fixme.t	Wed Mar 11 20:20:58 2009	(r37324)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,74 +0,0 @@
-#! perl
-# Copyright (C) 2006-2009, Parrot Foundation.
-# $Id$
-
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-use Test::More tests => 1;
-use Parrot::Distribution;
-
-=head1 NAME
-
-t/codingstd/fixme.t - checks for "FIXME" and similar notes in C source and headers
-
-=head1 SYNOPSIS
-
-    # test all files
-    % prove t/codingstd/fixme.t
-
-    # test specific files
-    % perl t/codingstd/fixme.t src/foo.c include/parrot/bar.h
-
-=head1 DESCRIPTION
-
-Checks that no C source or header file in the distribution contains the
-following strings:
-
-    FIXME
-    TODO
-    XXX
-
-=head1 SEE ALSO
-
-L<docs/pdds/pdd07_codingstd.pod>
-
-=cut
-
-my $DIST = Parrot::Distribution->new;
-my @files = @ARGV ? <@ARGV> : $DIST->get_c_language_files();
-my @fixme;
-my %failed_files;
-
-foreach my $file (@files) {
-
-    # if we have command line arguments, the file is the full path
-    # otherwise, use the relevant Parrot:: path method
-    my $path = @ARGV ? $file : $file->path;
-
-    open my $fh, '<', $path
-        or die "Cannot open '$path' for reading: $!\n";
-
-    while (<$fh>) {
-        next unless /(FIXME|XXX|TODO)/;
-
-        push @fixme, "file '$path', line $.: $1\n";
-        $failed_files{$path}++;
-    }
-    close $fh;
-}
-
-my $num_failed_files = scalar keys %failed_files;
-ok( !scalar(@fixme), 'FIXME strings' )
-    or diag( "FIXME strings found in "
-        . scalar @fixme
-        . " instances in "
-        . $num_failed_files
-        . " files:\n at fixme" );
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:


More information about the parrot-commits mailing list