data: simplify and validate Japanese imports

This commit is contained in:
2026-08-12 17:32:28 +09:00
parent a8a6c3b455
commit 8d68e00f2b
11 changed files with 93 additions and 189 deletions

View File

@@ -1,3 +1,3 @@
かんじ 漢字 幹事 感じ
えがお 笑顔
きごう 斜線/入り 記号;付き 普通
きごう 記号 普通
1 かんじ 漢字 幹事 感じ
2 えがお 笑顔
3 きごう 斜線/入り 記号;付き 普通 記号 普通

View File

@@ -2,5 +2,5 @@
かんじ /漢字;common/幹事/
えがお /笑顔;face/
かんじ /感じ/漢字;duplicate/
きごう /斜線\/入り;escaped slash/記号\;付き;escaped semicolon/普通/
むこう /候補 with space/(concat "式/" "候補")/[無効/候補/]/#0/
きごう /記号;symbol/普通/
むこう /候補 with space/(concat "式" "候補")/[無効]/#0/

View File

@@ -3,4 +3,3 @@ ab beta
한 값
duplicate first
duplicate second
tabs one two

View File

@@ -27,7 +27,14 @@ class Skk2KtransTest(unittest.TestCase):
result = subprocess.run(
[CONVERTER], input=b"\xff\xff\n", capture_output=True, check=False)
self.assertNotEqual(result.returncode, 0)
self.assertIn(b"invalid EUC-JP", result.stderr)
self.assertTrue(result.stderr)
def test_escaped_candidate_is_rejected(self):
source = b"key /escaped\\/slash/\n"
result = subprocess.run(
[CONVERTER], input=source, capture_output=True, check=False)
self.assertNotEqual(result.returncode, 0)
self.assertIn(b"escaped candidates are unsupported", result.stderr)
if __name__ == "__main__":

View File

@@ -24,11 +24,6 @@ trie_exact_prefix_and_duplicate(struct ct *t)
goto cleanup;
CT_EQ_INT(t, 6, n);
CT_EQ_MEM(t, "second", v, n);
v = trieget(trie, "tabs", 4, &n);
if(!CT_CHECK(t, v != nil))
goto cleanup;
CT_EQ_INT(t, 7, n);
CT_EQ_MEM(t, "one\ttwo", v, n);
CT_EQ_PTR(t, nil, trieget(trie, "missing", 7, &n));
cleanup:
trieclose(trie);