Author: paultcochrane
Date: Mon May 7 05:44:49 2007
New Revision: 18449
Modified:
trunk/t/codingstd/tabs.t
Log:
[t] Applied patch RT#42899 courtesy of Mike Mattie <codermattie at gmail dot
com>, adding line number output specifying where in a file the test fails.
Modified: trunk/t/codingstd/tabs.t
==============================================================================
--- trunk/t/codingstd/tabs.t (original)
+++ trunk/t/codingstd/tabs.t Mon May 7 05:44:49 2007
@@ -43,12 +43,15 @@
open my $fh, '<', $path
or die "Cannot open '$path' for reading: $!\n";
+ my $line = 1;
+
# search each line for leading tabs
while (<$fh>) {
if ( $_ =~ m/^ *\t/ ) {
- push @tabs => "$path\n";
- last;
+ push @tabs => "$path:$line\n";
}
+
+ $line++;
}
close $fh;
}
@@ -56,7 +59,7 @@
## L<PDD07/Code Formatting/"Indentation must consist only of spaces">
ok( !scalar(@tabs), "tabs in leading whitespace" )
or diag(
- "Found tab in leading whitespace in " . scalar(@tabs) . " files. Files
affected:[EMAIL PROTECTED]" );
+ "Found tab in leading whitespace " . scalar(@tabs) . " instances. Lines
found:[EMAIL PROTECTED]" );
# Local Variables:
# mode: cperl