undef $/;
-print "1..", scalar @prgs, "\n";
+print "1..", @prgs + 4, "\n";
for (@prgs){
`perl -I../lib $switch $tmpfile 2>&1` :
$^O eq 'MacOS' ?
`$^X -I::lib -MMac::err=unix $switch $tmpfile` :
- `./perl $switch $tmpfile 2>&1`;
+ `$^X $switch $tmpfile 2>&1`;
my $status = $?;
$results =~ s/\n+$//;
# allow expected output to be written as if $prog is on STDIN
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# $@";