Skip to content

Commit a66489b

Browse files
committed
APItest/t/utf8_warn_base: Change $variable name
'j' isn't very descriptive for this purpose
1 parent 9621dfa commit a66489b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/XS-APItest/t/utf8_warn_base.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,9 +1551,9 @@ ($)
15511551
# Test partial character handling, for each byte not a
15521552
# full character
15531553
my $did_test_partial = 0;
1554-
for (my $j = 1; $j < $this_length - 1; $j++) {
1554+
for (my $byte_count = 1; $byte_count < $this_expected_len - 1; $byte_count++) {
15551555
$did_test_partial = 1;
1556-
my $partial = substr($this_bytes, 0, $j);
1556+
my $partial = substr($this_bytes, 0, $byte_count);
15571557
my $ret_should_be;
15581558
my $comment;
15591559
if ($disallow_type || $malformations_name) {
@@ -1582,7 +1582,7 @@ ($)
15821582
$needed_to_tell = $dl if $dl < $needed_to_tell;
15831583
}
15841584

1585-
if ($j < $needed_to_tell) {
1585+
if ($byte_count < $needed_to_tell) {
15861586
$ret_should_be = 1;
15871587
$comment .= ", but need $needed_to_tell"
15881588
. " bytes to discern:";
@@ -1596,7 +1596,7 @@ ($)
15961596
undef @warnings_gotten;
15971597

15981598
$ret = test_is_utf8_valid_partial_char_flags($partial,
1599-
$j, $disallow_flags);
1599+
$byte_count, $disallow_flags);
16001600
is($ret, $ret_should_be,
16011601
" And is_utf8_valid_partial_char_flags("
16021602
. display_bytes($partial)

0 commit comments

Comments
 (0)