From 5a7dac4e435401addc047693f17f4d91177e2254 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Wed, 19 Apr 2006 14:57:36 +0000 Subject: [PATCH] Add a TODO test for RT #1085: "what should be output of perl -we 'print do { foreach (1, 2) { 1; } }'" p4raw-id: //depot/perl@27904 --- t/cmd/for.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/cmd/for.t b/t/cmd/for.t index 7bc1885..ccd0424 100755 --- a/t/cmd/for.t +++ b/t/cmd/for.t @@ -1,6 +1,6 @@ #!./perl -print "1..79\n"; +print "1..80\n"; for ($i = 0; $i <= 10; $i++) { $x[$i] = $i; @@ -460,6 +460,15 @@ is ($r, '1CBA', 'Reverse for array and value via map with var'); TODO: { $test++; + local $TODO = "RT #1085: what should be output of perl -we 'print do { foreach (1, 2) { 1; } }'"; + if (do {17; foreach (1, 2) { 1; } } != 17) { + print "not "; + } + print "ok $test # TODO $TODO\n"; +} + +TODO: { + $test++; no warnings 'reserved'; local $TODO = "RT #2166: foreach spuriously autovivifies"; my %h; -- 2.7.4