fix(mbyte): check for utf8proc_map() failure (#30531)

This commit is contained in:
zeertzjq
2024-09-27 07:40:46 +08:00
committed by GitHub
parent 98d1c0ebef
commit a9287dd882
2 changed files with 13 additions and 3 deletions

View File

@@ -347,4 +347,10 @@ describe('mbyte', function()
check('L̓̉̑̒̌̚ơ̗̌̒̄̀ŕ̈̈̎̐̕è̇̅̄̄̐m̖̟̟̅̄̚', {'L̓̉̑̒̌̚', 'ơ̗̌̒̄̀', 'ŕ̈̈̎̐̕', 'è̇̅̄̄̐', 'm̖̟̟̅̄̚'})
-- stylua: ignore end
end)
describe('utf_fold', function()
itp('does not crash with surrogates #30527', function()
eq(0xDDFB, lib.utf_fold(0xDDFB))
end)
end)
end)