Change 33876 by [EMAIL PROTECTED] on 2008/05/20 09:29:33
Subject: Re: [PATCH: TODO Tests] Re: [perl #53806] No complain about
bareword
From: "Rafael Garcia-Suarez" <[EMAIL PROTECTED]>
Date: Tue, 20 May 2008 10:14:28 +0200
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/lib/strict.t#11 edit
... //depot/perl/t/lib/strict/subs#12 edit
Differences ...
==== //depot/perl/lib/strict.t#11 (text) ====
Index: perl/lib/strict.t
--- perl/lib/strict.t#10~19845~ 2003-06-22 21:55:39.000000000 -0700
+++ perl/lib/strict.t 2008-05-20 02:29:33.000000000 -0700
@@ -84,17 +84,20 @@
$expected =~ s|(\./)?abc\.pm|:abc.pm|g if $^O eq 'MacOS';
$expected =~ s|./abc|:abc|g if $^O eq 'MacOS';
my $prefix = ($results =~ s/^PREFIX\n//) ;
+ my $TODO = $prog =~ m/^#\s*TODO:/;
if ( $results =~ s/^SKIPPED\n//) {
print "$results\n" ;
}
elsif (($prefix and $results !~ /^\Q$expected/) or
(!$prefix and $results ne $expected)){
- print STDERR "PROG: $switch\n$prog\n";
- print STDERR "EXPECTED:\n$expected\n";
- print STDERR "GOT:\n$results\n";
+ if (! $TODO) {
+ print STDERR "PROG: $switch\n$prog\n";
+ print STDERR "EXPECTED:\n$expected\n";
+ print STDERR "GOT:\n$results\n";
+ }
print "not ";
}
- print "ok " . ++$i . "\n";
+ print "ok " . ++$i . ($TODO ? " # TODO" : "") . "\n";
foreach (@temps)
{ unlink $_ if $_ }
}
==== //depot/perl/t/lib/strict/subs#12 (text) ====
Index: perl/t/lib/strict/subs
--- perl/t/lib/strict/subs#11~22499~ 2004-03-14 09:01:34.000000000 -0800
+++ perl/t/lib/strict/subs 2008-05-20 02:29:33.000000000 -0700
@@ -393,3 +393,18 @@
EXPECT
Bareword "FOO" not allowed while "strict subs" in use at - line 2.
Execution of - aborted due to compilation errors.
+########
+# TODO: [perl #53806] No complain about bareword
+use strict 'subs';
+print FOO . "\n";
+EXPECT
+Bareword "FOO" not allowed while "strict subs" in use at - line 3.
+Execution of - aborted due to compilation errors.
+########
+# TODO: [perl #53806] No complain about bareword
+use strict 'subs';
+$ENV{PATH} = "";
+system(FOO . "\n");
+EXPECT
+Bareword "FOO" not allowed while "strict subs" in use at - line 4.
+Execution of - aborted due to compilation errors.
End of Patch.