[libcode-tidyall-perl] 64/374: add

Jonas Smedegaard js at alioth.debian.org
Sun Sep 29 22:25:50 UTC 2013


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libcode-tidyall-perl.

commit 1b6b4abaaa071b10f542d63aa1819575b09eded9
Author: Jonathan Swartz <swartz at pobox.com>
Date:   Tue Jul 3 04:50:07 2012 -0700

    add
---
 lib/Test/Code/TidyAll.pm |   32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/lib/Test/Code/TidyAll.pm b/lib/Test/Code/TidyAll.pm
new file mode 100644
index 0000000..b6e06bc
--- /dev/null
+++ b/lib/Test/Code/TidyAll.pm
@@ -0,0 +1,32 @@
+package Test::Code::TidyAll;
+use IPC::System::Simple qw(run);
+use Code::TidyAll;
+use Test::Builder;
+use strict;
+use warnings;
+use base qw(Exporter);
+
+my $test = Test::Builder->new;
+
+our @EXPORT_OK = qw(tidyall_ok);
+our @EXPORT    = @EXPORT_OK;
+
+sub tidyall_ok {
+    my $conf_file = Code::TidyAll->find_conf_file(".");
+    my $ct        = Code::TidyAll->new( check_only => 1, conf_file => $conf_file );
+    my @files     = sort keys( %{ $ct->matched_files } );
+    $test->plan( tests => scalar(@files) );
+    foreach my $file (@files) {
+        my $desc   = $ct->_small_path($file);
+        my $result = $ct->process_file($file);
+        if ( $result->ok ) {
+            $test->ok( 1, $desc );
+        }
+        else {
+            $test->diag( $result->msg );
+            $test->ok( 0, $desc );
+        }
+    }
+}
+
+1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcode-tidyall-perl.git



More information about the Pkg-perl-cvs-commits mailing list