diff options
-rw-r--r-- | t/op/each.t | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/t/op/each.t b/t/op/each.t index 02438f2002..765bfdad77 100644 --- a/t/op/each.t +++ b/t/op/each.t @@ -106,16 +106,22 @@ isnt ($size, (split('/', scalar %hash))[1]); is (keys(%hash), 10, "keys (%hash)"); -is (keys(hash), 10, "keys (hash)"); +{ + no warnings 'deprecated'; + is (keys(hash), 10, "keys (hash)"); +} $i = 0; %h = (a => A, b => B, c=> C, d => D, abc => ABC); -@keys = keys(h); -@values = values(h); -while (($key, $value) = each(h)) { +{ + no warnings 'deprecated'; + @keys = keys(h); + @values = values(h); + while (($key, $value) = each(h)) { if ($key eq $keys[$i] && $value eq $values[$i] && $key eq lc($value)) { $i++; } + } } is ($i, 5); |