Fix #2394: Sphinx crashes when html_last_updated_fmt is invalid

This commit is contained in:
Takeshi KOMIYA
2016-04-01 11:20:30 +09:00
parent 42395a177a
commit 8ab06530be
6 changed files with 24 additions and 6 deletions

View File

@@ -185,6 +185,14 @@ def test_format_date():
assert i18n.format_date(format, date=date, language='ja') == u'2月 07, 2016'
assert i18n.format_date(format, date=date, language='de') == 'Februar 07, 2016'
# invalid date format
format = 'Mon Mar 28 12:37:08 2016, commit 4367aef'
assert i18n.format_date(format, date=date) == format
# quoted format
quoted_format = "'Mon Mar 28 12:37:08 2016, commit 4367aef'"
assert i18n.format_date(quoted_format, date=date) == format
def test_get_filename_for_language():
app = TestApp()