You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
msgfmt.py: Test validity of generated file #131853
de12 0495 - magic number
0000 0000 - version
0900 0000 - # of entries
1c00 0000 - start of key index
6400 0000 - size of value table
0000 0000 - size of hash table
0000 0000 - offset of hash table
We currently do not test the structure of the .mo though it is partially covered as I presume the translation tests may fail but that depends on gettext.
Testing the last four will result in errors with a msgfmt.c generated general.mo as msgfmt.c generates a hash table (this will change soon I hope as we will too #131725 :-) so I think we should just test the first 3 for now and test the rest later.
I will send a pr
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Activity
StanFromIreland commentedon Mar 28, 2025
tomasr8 commentedon Mar 28, 2025
We already have some binary MO files checked in as part of the snapshot tests, but an explicit test for the header would be nice 👍
gh-131853: Test binary header in msgfmt generated file (GH-131854)
pythongh-131853: Fix test_msgfmt on big-endian platforms
gh-131853: Fix test_msgfmt on big-endian platforms (GH-131879)