Expose to_search_normalized to Lua, add test, and use in ListColumn (most useful for the `stocks` plugin)
parent
8d85261cdc
commit
9c8098b4f0
@ -0,0 +1,8 @@
|
|||||||
|
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
|
Loading…
Reference in New Issue