Skip to content

Commit d88da08

Browse files
committed
t/test.pl - if string difference is before position 40 do it right
We were displaying the start of the string wrong when the difference started before offset 40.
1 parent 719729c commit d88da08

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/test.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,8 @@ ($$@)
363363
my $p = 0;
364364
$p++ while substr($got,$p,1) eq substr($expected,$p,1);
365365
push @mess,"# diff at $p\n";
366-
push @mess,"# after "._qq(substr($got,$p-40<0 ? 0 : $p-40,40))."\n";
366+
push @mess,"# after "._qq(substr($got,$p < 40 ? 0 : $p - 40,
367+
$p < 40 ? $p : 40)) . "\n";
367368
push @mess,"# have "._qq(substr($got,$p,40))."\n";
368369
push @mess,"# want "._qq(substr($expected,$p,40))."\n";
369370
}

0 commit comments

Comments
 (0)