From 8df79aeaf8fe08f685f5f57dd2dafd637d045a58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 19 Jan 2007 12:01:04 +0000 Subject: [PATCH] r56628@Arsia: avar | 2007-01-19 11:51:14 +0000 * Regression test to make sure we use tags --- t/maint/php-tag.t | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 t/maint/php-tag.t 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"; + } +} + + + -- 2.20.1