mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add a testcase for deterministic msgid order
This commit is contained in:
@@ -165,3 +165,18 @@ def test_gettext_template(app):
|
||||
result = (app.outdir / 'sphinx.pot').text(encoding='utf-8')
|
||||
assert "Welcome" in result
|
||||
assert "Sphinx %(version)s" in result
|
||||
|
||||
|
||||
@pytest.mark.sphinx('gettext', testroot='intl-template')
|
||||
def test_gettext_template_msgid_order_in_sphinxpot(app):
|
||||
app.builder.build_all()
|
||||
assert (app.outdir / 'sphinx.pot').isfile()
|
||||
|
||||
result = (app.outdir / 'sphinx.pot').text(encoding='utf-8')
|
||||
assert re.search(
|
||||
('msgid "Template 1".*'
|
||||
'msgid "This is Template 1\.".*'
|
||||
'msgid "Template 2".*'
|
||||
'msgid "This is Template 2\.".*'),
|
||||
result,
|
||||
flags=re.S)
|
||||
|
Reference in New Issue
Block a user