summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2004-09-09 07:46:34 +0200
committerjocuri%softhome.net <>2004-09-09 07:46:34 +0200
commit8065d3b2d560911f953e49181c49cc407461c645 (patch)
tree263ef5ab2e99666fec736f61c0d8060417995422 /t
parent3bb639dcec99f03a5692682decdb52fe6577bae7 (diff)
downloadbugzilla-8065d3b2d560911f953e49181c49cc407461c645.tar.gz
bugzilla-8065d3b2d560911f953e49181c49cc407461c645.tar.xz
Patch for bug 211188: Make testing suite check for any #! lines that are not /usr/bin/perl; patch by Marc Schumann <wurblzap@gmail.com>; r=vladd, a=justdave.
Diffstat (limited to 't')
-rw-r--r--t/002goodperl.t12
1 files changed, 8 insertions, 4 deletions
diff --git a/t/002goodperl.t b/t/002goodperl.t
index 676cd1776..e9726cb8c 100644
--- a/t/002goodperl.t
+++ b/t/002goodperl.t
@@ -48,7 +48,7 @@ foreach my $file (@testitems) {
$file =~ m/.*\.(.*)/;
my $ext = $1;
- if ($file_line1 !~ m#/usr/bin/perl#) {
+ if ($file_line1 !~ m/^#\!/) {
ok(1,"$file does not have a shebang");
} else {
my $flags;
@@ -66,10 +66,14 @@ foreach my $file (@testitems) {
next;
}
- if ($file_line1 =~ m#/usr/bin/perl -$flags#) {
- ok(1,"$file uses -$flags");
+ if ($file_line1 =~ m#^\#\!/usr/bin/perl\s#) {
+ if ($file_line1 =~ m#\s-$flags#) {
+ ok(1,"$file uses standard perl location and -$flags");
+ } else {
+ ok(0,"$file is MISSING -$flags --WARNING");
+ }
} else {
- ok(0,"$file is MISSING -$flags --WARNING");
+ ok(0,"$file uses non-standard perl location");
}
}
}