summaryrefslogtreecommitdiff
path: root/t/maint/bom.t
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-07-28 11:52:48 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-07-28 11:52:48 +0200
commit222b01f5169f1c7e69762e0e8904c24f78f71882 (patch)
tree8e932e12546bb991357ec48eb1638d1770be7a35 /t/maint/bom.t
parent00ab76a6b686e98a914afc1975812d2b1aaa7016 (diff)
update to MediaWiki 1.16.0
Diffstat (limited to 't/maint/bom.t')
-rw-r--r--t/maint/bom.t38
1 files changed, 0 insertions, 38 deletions
diff --git a/t/maint/bom.t b/t/maint/bom.t
deleted file mode 100644
index b5e6ae98..00000000
--- a/t/maint/bom.t
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env perl
-#
-# This test detect Byte Order Mark (BOM). The char is sometime included at the
-# top of files by some text editors to mark them as being UTF-8 encoded.
-# They are not stripped by php 5.x and appear at the beginning of our content,
-# You want them removed!
-# See:
-# http://www.fileformat.info/info/unicode/char/feff/index.htm
-# http://bugzilla.wikimedia.org/show_bug.cgi?id=9954
-
-use strict;
-use warnings;
-
-use Test::More;
-
-use File::Find;
-
-# Files for wich we want to check the BOM char ( 0xFE 0XFF )
-my $ext = qr/(?:php|inc)/x ;
-
-my $bomchar = qr/\xef\xbb\xbf/ ;
-
-my @files;
-
-find( sub{ push @files, $File::Find::name if -f && /\.$ext$/ }, '.' );
-
-# Register our files with the test system
-plan tests => scalar @files ;
-
-for my $file (@files) {
- open my $fh, "<", $file or die "Couln't open $file: $!";
- my $line = <$fh>;
- if( $line =~ /$bomchar/ ) {
- fail "$file has a Byte Order Mark at line $.";
- } else {
- pass "$file has no Byte Order Mark!";
- }
-}