From 9c41d26fdb277f451ff9e6ae62f17bc2feaa0995 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sat, 20 Jan 2007 23:35:37 +0000 Subject: [PATCH] * add a lame verbose statement * add a test for svn:eol-style=native property --- Makefile | 3 +++ t/maint/eol-style.t | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 t/maint/eol-style.t diff --git a/Makefile b/Makefile index 0cfba45ad4..e0763a6e63 100644 --- 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 index 0000000000..749613e9f7 --- /dev/null +++ b/t/maint/eol-style.t @@ -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"; + } +} -- 2.20.1