diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2007-05-16 20:58:53 +0000 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2007-05-16 20:58:53 +0000 |
commit | cecb985bee3bdd252e1b8dc0bd500b37cd52be01 (patch) | |
tree | 17266aa237742640aabee7856f0202317a45d540 /t/maint/eol-style.t | |
parent | 0bac06c301f2a83edb0236e4c2434da16848d549 (diff) |
Aktualisierung auf MediaWiki 1.10.0
Plugins angepasst und verbessert
kleine Korrekturen am Design
Diffstat (limited to 't/maint/eol-style.t')
-rw-r--r-- | t/maint/eol-style.t | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/t/maint/eol-style.t b/t/maint/eol-style.t new file mode 100644 index 00000000..d877a264 --- /dev/null +++ b/t/maint/eol-style.t @@ -0,0 +1,35 @@ +#!/usr/bin/env perl +# +# Based on php-tag.t +# +use strict; +use warnings; + +use Test::More; +use File::Find; +use IPC::Open3; +use File::Spec; +use Symbol qw(gensym); + +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) { + open NULL, '+>', File::Spec->devnull and \*NULL or die; + my $pid = open3('<&NULL', \*P, '>&NULL', qw'svn propget svn:eol-style', $file); + my $res = do { local $/; <P> . "" }; + chomp $res; + waitpid $pid, 0; + + if ( $? != 0 ) { + ok 1 => "svn propget failed, $file probably not under version control"; + } elsif ( $res eq 'native' ) { + ok 1 => "$file svn:eol-style is 'native'"; + } else { + ok 0 => "$file svn:eol-style is '$res', should be 'native'"; + } +} |