diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-12-03 02:44:40 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-12-03 02:44:40 +0000 |
commit | 0121b80e4f69c2ad9631e8d20b5c91f3b2a40434 (patch) | |
tree | 49a8ade446c1b6277c06982988700467e1be139c /gnu/usr.bin/perl/lib/strict.t | |
parent | 184128d6fb928711cdef9d8e6980dc6601fb1f87 (diff) |
perl 5.8.2 from CPAN
Diffstat (limited to 'gnu/usr.bin/perl/lib/strict.t')
-rw-r--r-- | gnu/usr.bin/perl/lib/strict.t | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/gnu/usr.bin/perl/lib/strict.t b/gnu/usr.bin/perl/lib/strict.t index 02f191b9c52..1868f486852 100644 --- a/gnu/usr.bin/perl/lib/strict.t +++ b/gnu/usr.bin/perl/lib/strict.t @@ -20,7 +20,7 @@ my @prgs = () ; foreach (sort glob($^O eq 'MacOS' ? ":lib:strict:*" : "lib/strict/*")) { - next if /(~|\.orig|,v)$/; + next if -d || /(~|\.orig|,v)$/; open F, "<$_" or die "Cannot open $_: $!\n" ; while (<F>) { @@ -36,7 +36,7 @@ foreach (sort glob($^O eq 'MacOS' ? ":lib:strict:*" : "lib/strict/*")) { undef $/; -print "1..", scalar @prgs, "\n"; +print "1.." . (@prgs + 4) . "\n"; for (@prgs){ @@ -94,7 +94,23 @@ for (@prgs){ print STDERR "GOT:\n$results\n"; print "not "; } - print "ok ", ++$i, "\n"; + print "ok " . ++$i . "\n"; foreach (@temps) { unlink $_ if $_ } } + +eval qq(use strict 'garbage'); +print +($@ =~ /^Unknown 'strict' tag\(s\) 'garbage'/) + ? "ok ".++$i."\n" : "not ok ".++$i."\t# $@"; + +eval qq(no strict 'garbage'); +print +($@ =~ /^Unknown 'strict' tag\(s\) 'garbage'/) + ? "ok ".++$i."\n" : "not ok ".++$i."\t# $@"; + +eval qq(use strict qw(foo bar)); +print +($@ =~ /^Unknown 'strict' tag\(s\) 'foo bar'/) + ? "ok ".++$i."\n" : "not ok ".++$i."\t# $@"; + +eval qq(no strict qw(foo bar)); +print +($@ =~ /^Unknown 'strict' tag\(s\) 'foo bar'/) + ? "ok ".++$i."\n" : "not ok ".++$i."\t# $@"; |