Skip to content

Commit

Permalink
Fix check.py to reflect format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
syimyuzya committed Sep 5, 2024
1 parent 451cb0d commit 2cfa9e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion check.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def contains_ascii(s: str):
with open('韻書/廣韻.csv') as f:
assert (
next(f).rstrip('\n')
== '小韻號,小韻內字序,韻目原貌,音韻地位,反切,字頭,釋義,釋義補充'
== '小韻號,小韻內字序,韻目原貌,音韻地位,反切,反切原貌,字頭,釋義,釋義補充'
)
for line in f:
(
Expand All @@ -31,6 +31,7 @@ def contains_ascii(s: str):
韻目原貌,
音韻地位描述,
反切,
反切原貌,
字頭,
釋義,
釋義補充,
Expand All @@ -43,6 +44,9 @@ def contains_ascii(s: str):
2,
0,
), 'The length of 反切 should be 2, otherwise it should be an empty string'
assert 反切原貌 == '' or len(反切原貌) == len(
反切
), '反切原貌 should either be empty or have the same length with 反切'
assert len(字頭) == 1, 'The length of 字頭 should be 1'
assert not contains_ascii(
釋義
Expand Down

0 comments on commit 2cfa9e4

Please sign in to comment.