Skip to content

Commit

Permalink
Add another test for UTF-7 text conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdowad committed Aug 31, 2021
1 parent 51b6c68 commit 3554649
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/mbstring/tests/utf_encodings.phpt
Expand Up @@ -1021,6 +1021,9 @@ $encoded = encode("\x12\x34", 'UTF-16BE'); // 3 Base64 bytes, 2 bits of padding.
$corrupted = substr($encoded, 0, 2) . chr(ord($encoded[2]) + 1);
testInvalidString('+' . $corrupted . '-', "\x00\x00\x12\x34\x00\x00\x00%", 'UTF-7', 'UTF-32BE');

// Characters which are not Base64 (and not even ASCII) appearing in Base64 section
testInvalidString("+\x80", "\x00\x00\x00%", 'UTF-7', 'UTF-32BE');

echo "Done!\n";

?>
Expand Down

0 comments on commit 3554649

Please sign in to comment.