ICU 53 no longer return the same collation order for numbers whose value is different even if they have the same first digit.

This commit is contained in:
Kovid Goyal 2014-04-29 08:46:16 +05:30
parent 46907f98af
commit c3812f131b

View File

@ -116,13 +116,12 @@ class TestICU(unittest.TestCase):
for group in [ for group in [
('Šaa', 'Smith', 'Solženicyn', 'Štepánek'), ('Šaa', 'Smith', 'Solženicyn', 'Štepánek'),
('01', '1'), ('01', '1'),
('1', '11', '13'),
]: ]:
last = None last = None
for x in group: for x in group:
order, length = icu.numeric_collator().collation_order(x) order, length = icu.numeric_collator().collation_order(x)
if last is not None: if last is not None:
self.ae(last, order) self.ae(last, order, 'Order for %s not correct: %s != %s' % (x, last, order))
last = order last = order
self.ae(dict(icu.partition_by_first_letter(['A1', '', 'a1', '\U0001f431', '\U0001f431x'])), self.ae(dict(icu.partition_by_first_letter(['A1', '', 'a1', '\U0001f431', '\U0001f431x'])),