Skip to content

Commit

Permalink
Add 2 unit tests from pull request GH Perl#22597
Browse files Browse the repository at this point in the history
Added to the commit immediately preceding the commit which the poster
states broke utf8n_to_uvchr, without adding code changes from that p.r.
  • Loading branch information
jkeenan committed Sep 15, 2024
1 parent c0e63b1 commit 8fbf143
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion t/op/lex.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use warnings;

BEGIN { chdir 't' if -d 't'; require './test.pl'; }

plan(tests => 36);
#plan(tests => 36);
plan(tests => 38);

{
print <<''; # Yow!
Expand Down Expand Up @@ -284,3 +285,20 @@ EOM

fresh_perl_like('flock _$', qr/Not enough arguments for flock/, {stderr => 1},
"[perl #129190] intuit_method() invalidates PL_bufptr");

# test-driven development; first, add the tests from GH #22597


fresh_perl_like(
qq(use utf8; \xC2\xE3\x81\x82),
qr/^Malformed UTF-8 character:/,
{stderr => 1},
'Error handling for invalid UTF-8 sequences starting with leading bytes',
);

fresh_perl_like(
qq(use utf8; \xFF\xE3\x81\x82),
qr/^Malformed UTF-8 character:/,
{stderr => 1},
'Error handling for invalid UTF-8 sequences starting with unassigned bytes',
);

0 comments on commit 8fbf143

Please sign in to comment.