summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/2goodperl.t10
1 files changed, 8 insertions, 2 deletions
diff --git a/t/2goodperl.t b/t/2goodperl.t
index fa6d9a8dc..ff805b644 100644
--- a/t/2goodperl.t
+++ b/t/2goodperl.t
@@ -57,12 +57,18 @@ foreach $file (@testitems) {
next;
}
}
- if ($filecontent !~ /use strict;/) {
+}
+foreach $file (@testitems) {
+ $file =~ s/\s.*$//; # nuke everything after the first space (#comment)
+ next if (!$file); # skip null entries
+ $filecontent = `cat $file`;
+ if ($filecontent !~ /use strict/) {
ok(0,"$file DOES NOT use strict");
} else {
- ok(1,"$files uses strict");
+ ok(1,"$file uses strict");
}
}
+