mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Fix undeclared loop variable in Perl test suite
Reported-by: Hubert Tarasiuk <hubert.tarasiuk@gmail.com>
This commit is contained in:
parent
8682c2612f
commit
83537f2415
@ -265,13 +265,12 @@ sub _show_diff
|
|||||||
my $min = $explen <= $actlen ? $explen : $actlen;
|
my $min = $explen <= $actlen ? $explen : $actlen;
|
||||||
my $line = 1;
|
my $line = 1;
|
||||||
my $col = 1;
|
my $col = 1;
|
||||||
my $i;
|
my $i = 0;
|
||||||
|
|
||||||
# for ($i=0; $i != $min; ++$i) {
|
while ( $i < $min )
|
||||||
for my $i (0 .. $min - 1)
|
|
||||||
{
|
{
|
||||||
last if substr($expected, $i, 1) ne substr $actual, $i, 1;
|
last if substr($expected, $i, 1) ne substr $actual, $i, 1;
|
||||||
if (substr($expected, $i, 1) eq q{\n})
|
if (substr($expected, $i, 1) eq "\n")
|
||||||
{
|
{
|
||||||
$line++;
|
$line++;
|
||||||
$col = 0;
|
$col = 0;
|
||||||
@ -280,6 +279,7 @@ sub _show_diff
|
|||||||
{
|
{
|
||||||
$col++;
|
$col++;
|
||||||
}
|
}
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
my $snip_start = $i - ($SNIPPET_SIZE / 2);
|
my $snip_start = $i - ($SNIPPET_SIZE / 2);
|
||||||
if ($snip_start < 0)
|
if ($snip_start < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user