diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2012-09-01 23:43:00 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-09-01 23:43:00 +0200 |
commit | 1001cbba7b16ccc4611bbee0474264bb551d1ea5 (patch) | |
tree | 9596c12f8ed8730e864acdfc10ddd08b0796f8ef /t | |
parent | 88157fb0e84c374031020e0bd4ca82bb450bb146 (diff) | |
download | bugzilla-1001cbba7b16ccc4611bbee0474264bb551d1ea5.tar.gz bugzilla-1001cbba7b16ccc4611bbee0474264bb551d1ea5.tar.xz |
Bug 787529: Use |use 5.10.1| everywhere
r=wicked a=LpSolit
Diffstat (limited to 't')
-rw-r--r-- | t/002goodperl.t | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/t/002goodperl.t b/t/002goodperl.t index e691b39dd..4826c7712 100644 --- a/t/002goodperl.t +++ b/t/002goodperl.t @@ -16,7 +16,7 @@ use lib 't'; use Support::Files; -use Test::More tests => (scalar(@Support::Files::testitems) * 3); +use Test::More tests => (scalar(@Support::Files::testitems) * 4); my @testitems = @Support::Files::testitems; # get the files to test. @@ -84,6 +84,28 @@ foreach my $file (@testitems) { } } +foreach my $file (@testitems) { + my $found_use_feature = 0; + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + if (! open (FILE, $file)) { + ok(0,"could not open $file --WARNING"); + next; + } + while (my $file_line = <FILE>) { + if ($file_line =~ m/^\s*use 5.10.1/) { + $found_use_feature = 1; + last; + } + } + close (FILE); + if ($found_use_feature) { + ok(1,"$file requires Perl 5.10.1"); + } else { + ok(0,"$file DOES NOT require Perl 5.10.1 --WARNING"); + } +} + # Check to see that all error messages use tags (for l10n reasons.) foreach my $file (@testitems) { $file =~ s/\s.*$//; # nuke everything after the first space (#comment) |