dfhack/test/encoding.lua

11 lines
462 B
Lua

2023-08-04 10:59:08 -06:00
config.target = 'core'
2023-08-03 23:38:49 -06:00
function test.toSearchNormalized()
expect.eq(dfhack.toSearchNormalized(''), '')
expect.eq(dfhack.toSearchNormalized('abcd'), 'abcd')
expect.eq(dfhack.toSearchNormalized('ABCD'), 'abcd')
expect.eq(dfhack.toSearchNormalized(dfhack.utf2df('áçèîöü')), 'aceiou')
expect.eq(dfhack.toSearchNormalized(dfhack.utf2df('ÄÇÉÖÜÿ')), 'aceouy')
expect.eq(dfhack.toSearchNormalized(dfhack.utf2df('æÆ')), 'aeae')
end