Commit 8065d3b2 authored by jocuri%softhome.net's avatar jocuri%softhome.net

Patch for bug 211188: Make testing suite check for any #! lines that are not…

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.
parent 3bb639dc
...@@ -48,7 +48,7 @@ foreach my $file (@testitems) { ...@@ -48,7 +48,7 @@ foreach my $file (@testitems) {
$file =~ m/.*\.(.*)/; $file =~ m/.*\.(.*)/;
my $ext = $1; my $ext = $1;
if ($file_line1 !~ m#/usr/bin/perl#) { if ($file_line1 !~ m/^#\!/) {
ok(1,"$file does not have a shebang"); ok(1,"$file does not have a shebang");
} else { } else {
my $flags; my $flags;
...@@ -66,11 +66,15 @@ foreach my $file (@testitems) { ...@@ -66,11 +66,15 @@ foreach my $file (@testitems) {
next; next;
} }
if ($file_line1 =~ m#/usr/bin/perl -$flags#) { if ($file_line1 =~ m#^\#\!/usr/bin/perl\s#) {
ok(1,"$file uses -$flags"); if ($file_line1 =~ m#\s-$flags#) {
ok(1,"$file uses standard perl location and -$flags");
} else { } else {
ok(0,"$file is MISSING -$flags --WARNING"); ok(0,"$file is MISSING -$flags --WARNING");
} }
} else {
ok(0,"$file uses non-standard perl location");
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment