engine: room for 128 candidates
32 hid the tail of common readings: きょう has 41 kanji, 구 has 352 hanja. 128 covers every kanji entry and the hanja dictionary now keeps that many per reading.
This commit is contained in:
@@ -128,12 +128,12 @@ class MkhanjaTest(unittest.TestCase):
|
||||
self.assertIn("한\t", result.stdout)
|
||||
|
||||
def test_generator_keeps_runtime_candidate_limit(self):
|
||||
rows = "".join(f"{chr(0x4E00 + n)}\t한\n" for n in range(33))
|
||||
rows = "".join(f"{chr(0x4E00 + n)}\t한\n" for n in range(129))
|
||||
result = run(GENERATE, self.source(rows))
|
||||
self.assertEqual(result.returncode, 0, result.stderr)
|
||||
candidates = result.stdout.rstrip().split("\t", 1)[1].split()
|
||||
self.assertEqual(len(candidates), 32)
|
||||
self.assertEqual(candidates[-1], chr(0x4E00 + 31))
|
||||
self.assertEqual(len(candidates), 128)
|
||||
self.assertEqual(candidates[-1], chr(0x4E00 + 127))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user