From: Ævar Arnfjörð Bjarmason Date: Fri, 19 Jan 2007 12:01:04 +0000 (+0000) Subject: r56628@Arsia: avar | 2007-01-19 11:51:14 +0000 X-Git-Tag: 1.31.0-rc.0~54299 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=8df79aeaf8fe08f685f5f57dd2dafd637d045a58;p=lhc%2Fweb%2Fwiklou.git r56628@Arsia: avar | 2007-01-19 11:51:14 +0000 * Regression test to make sure we use tags --- diff --git a/t/maint/php-tag.t b/t/maint/php-tag.t new file mode 100644 index 0000000000..80b870b7cf --- /dev/null +++ b/t/maint/php-tag.t @@ -0,0 +1,29 @@ +#!/usr/bin/env perl +use strict; +use warnings; + +use Test::More;; + +use File::Find; +use File::Slurp qw< slurp >; + +my $ext = qr/(?: php | inc )/x; + +my @files; +find( sub { push @files, $File::Find::name if -f && /\. $ext $/x }, '.' ); + +plan tests => scalar @files; + +for my $file (@files) { + my $cont = slurp $file; + if ( $cont =~ m<<\?php .* \?>>xs ) { + ok 1 => "$file has "; + } elsif ( $cont =~ m<<\? .* \?>>xs ) { + ok 0 => "$file does not use "; + } else { + ok 1 => "$file has neither nor , check it"; + } +} + + +