* add a lame verbose statement
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 20 Jan 2007 23:35:37 +0000 (23:35 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 20 Jan 2007 23:35:37 +0000 (23:35 +0000)
* add a test for svn:eol-style=native property

Makefile
t/maint/eol-style.t [new file with mode: 0644]

index 0cfba45..e0763a6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,5 @@
 test: Test.php
        prove -r t
+
+verbose:
+       prove -v -r t | egrep -v '^ok'
diff --git a/t/maint/eol-style.t b/t/maint/eol-style.t
new file mode 100644 (file)
index 0000000..749613e
--- /dev/null
@@ -0,0 +1,29 @@
+#!/usr/bin/env perl
+#
+# Based on php-tag.t
+#
+use strict;
+use warnings;
+
+use Test::More;
+use File::Find;
+
+my $ext = qr/(?: php | inc | txt | sql | t)/x;
+my @files;
+
+find( sub { push @files, $File::Find::name if -f && /\. $ext $/x }, '.' );
+
+plan tests => scalar @files ;
+
+for my $file (@files) {
+       my $res = `svn propget svn:eol-style $file 2>&1` ;
+
+       if( $res =~ 'native' ) {
+               ok 1 => "$file svn:eol-style is 'native'";
+       } elsif( $res =~ substr( $file, 2 ) ) {
+               # not under version control
+               next;
+       } else {
+               ok 0 => "svn:eol-style not native $file";
+       }
+}