diff options
Diffstat (limited to 'src/test/modules/test_json_parser/t/002_inline.pl')
-rw-r--r-- | src/test/modules/test_json_parser/t/002_inline.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/modules/test_json_parser/t/002_inline.pl b/src/test/modules/test_json_parser/t/002_inline.pl index b95cb6b16a9..7c4134b3a6a 100644 --- a/src/test/modules/test_json_parser/t/002_inline.pl +++ b/src/test/modules/test_json_parser/t/002_inline.pl @@ -127,4 +127,12 @@ test( '"\\\\\\\\\\\\\\"', error => qr/Token ""\\\\\\\\\\\\\\"" is invalid/); +# Case with three bytes: double-quote, backslash and <f5>. +# Both invalid-token and invalid-escape are possible errors, because for +# smaller chunk sizes the incremental parser skips the string parsing when +# it cannot find an ending quote. +test("incomplete UTF-8 sequence", + "\"\\\x{F5}", + error => qr/(Token|Escape sequence) ""?\\\x{F5}" is invalid/); + done_testing(); |