Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfdd6f39

Browse files
DiffNormalizationTest.txt in CI
1 parentcf65828 commitfdd6f39

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

‎.github/workflows/rust.yml‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ jobs:
1818
runs-on:ubuntu-latest
1919
steps:
2020
-uses:actions/checkout@v4
21-
-uses:actions/setup-python@v5
22-
with:
23-
python-version:'3.12'
2421
-name:Regen tables
2522
run:cd scripts && python3 unicode.py
2623
-name:Diff tables
@@ -36,3 +33,14 @@ jobs:
3633
-name:Check clippy
3734
run:cargo clippy --lib --tests
3835

36+
regen:
37+
runs-on:ubuntu-latest
38+
steps:
39+
-uses:actions/checkout@v4
40+
-uses:actions/setup-python@v5
41+
with:
42+
python-version:'3.12'
43+
-name:Regen
44+
run:rm tests/NormalizationTest.txt && cd scripts && python3 unicode.py
45+
-name:Diff
46+
run:git diff-index --quiet HEAD --

‎scripts/unicode.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ class OffsetType(enum.IntEnum):
6565
6666
If this is edited, you must ensure that `emit_module` reflects your changes."""
6767

68-
MODULE_FILENAME="tables.rs"
69-
"""Thefilename of the emitted Rust module (will be created in the working directory)"""
68+
MODULE_PATH="../src/tables.rs"
69+
"""Thepath of the emitted Rust module (relative to the working directory)"""
7070

7171
Codepoint=int
7272
BitPos=int
@@ -645,7 +645,7 @@ def emit_module(
645645
module.write("}\n")
646646

647647

648-
defmain(module_filename:str):
648+
defmain(module_path:str):
649649
"""Obtain character data from the latest version of Unicode, transform it into a multi-level
650650
lookup table for character width, and write a Rust module utilizing that table to
651651
`module_filename`.
@@ -703,9 +703,9 @@ def main(module_filename: str):
703703
print("------------------------")
704704
print(f" Total size:{total_size} bytes")
705705

706-
emit_module(module_filename,version,tables,variation_table)
707-
print(f'Wrote to "{module_filename}"')
706+
emit_module(module_path,version,tables,variation_table)
707+
print(f'Wrote to "{module_path}"')
708708

709709

710710
if__name__=="__main__":
711-
main(MODULE_FILENAME)
711+
main(MODULE_PATH)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp