mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add test coverage for 'today_fmt' reference substitution (#10980)
This commit is contained in:
parent
da25145d08
commit
041e5f8268
@ -45,3 +45,4 @@ D-5. Link to `Translation Tips`_ and `Next Section`_ section.
|
||||
|
||||
Next Section
|
||||
-------------
|
||||
Last updated |today|.
|
||||
|
@ -1383,3 +1383,13 @@ def test_customize_system_message(make_app, app_params, sphinx_test_tempdir):
|
||||
assert 'QUICK SEARCH' in content
|
||||
finally:
|
||||
locale.translators.clear()
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='intl', confoverrides={'today_fmt': '%Y-%m-%d'})
|
||||
def test_customize_today_date_format(app, monkeypatch):
|
||||
with monkeypatch.context() as m:
|
||||
m.setenv('SOURCE_DATE_EPOCH', '1439131307')
|
||||
app.build()
|
||||
content = (app.outdir / 'refs.html').read_text(encoding='utf8')
|
||||
|
||||
assert '2015-08-09' in content
|
||||
|
Loading…
Reference in New Issue
Block a user