10000 gh-131725: Generate GNU hash table in `msgfmt.py` by StanFromIreland · Pull Request #131727 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-131725: Generate GNU hash table in msgfmt.py #131727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Update stuff
  • Loading branch information
StanFromIreland committed Mar 27, 2025
commit a58a559b8c9d3e1bef92b99b3c905cdfd72b994c
Binary file modified Lib/test/test_tools/msgfmt_data/fuzzy.mo
Binary file not shown.
Binary file modified Lib/test/test_tools/msgfmt_data/general.mo
Binary file not shown.
5 changes: 4 additions & 1 deletion Lib/test/test_tools/test_msgfmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def test_compilation(self):

self.assertDictEqual(actual._catalog, expected._catalog)

def test_hash_table(self):
pass

def test_po_with_bom(self):
with temp_cwd():
Path('bom.po').write_bytes(b'\xef\xbb\xbfmsgid "Python"\nmsgstr "Pioton"\n')
Expand Down Expand Up @@ -103,7 +106,7 @@ def test_version(self):
for option in ('--version', '-V'):
res = assert_python_ok(msgfmt, option)
out = res.out.decode('utf-8').strip()
self.assertEqual('msgfmt.py 1.2', out)
self.assertEqual('msgfmt.py 1.3', out)

def test_invalid_option(self):
res = assert_python_failure(msgfmt, '--invalid-option')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:program:`msgfmt` now generates GNU hash tables.
0