projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee8ba35
)
Add test for RT #2166: foreach spuriously autovivifies
author
Steve Peters
<steve@fisharerojo.org>
Thu, 23 Feb 2006 17:42:09 +0000
(17:42 +0000)
committer
Steve Peters
<steve@fisharerojo.org>
Thu, 23 Feb 2006 17:42:09 +0000
(17:42 +0000)
p4raw-id: //depot/perl@27287
t/cmd/for.t
patch
|
blob
|
history
diff --git
a/t/cmd/for.t
b/t/cmd/for.t
index
0814e7b
..
7bc1885
100755
(executable)
--- a/
t/cmd/for.t
+++ b/
t/cmd/for.t
@@
-1,6
+1,6
@@
#!./perl
-print "1..7
8
\n";
+print "1..7
9
\n";
for ($i = 0; $i <= 10; $i++) {
$x[$i] = $i;
@@
-457,3
+457,15
@@
for my $i (reverse (map {$_} @array, 1)) {
$r .= $i;
}
is ($r, '1CBA', 'Reverse for array and value via map with var');
+
+TODO: {
+ $test++;
+ no warnings 'reserved';
+ local $TODO = "RT #2166: foreach spuriously autovivifies";
+ my %h;
+ foreach (@h{a, b}) {}
+ if(keys(%h)) {
+ print "not ";
+ }
+ print "ok $test # TODO $TODO\n";
+}