diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-04-01 11:20:30 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-04-01 11:20:30 +0900 |
commit | 8ab06530be89e3f42c43899b43872b0df1dd5a3d (patch) | |
tree | 2c035f673930a0edd531dab6238fccab654dc613 /tests/test_util_i18n.py | |
parent | 42395a177adaa92c4955248d9b96f337e8923bd8 (diff) | |
download | sphinx-git-8ab06530be89e3f42c43899b43872b0df1dd5a3d.tar.gz |
Fix #2394: Sphinx crashes when html_last_updated_fmt is invalid
Diffstat (limited to 'tests/test_util_i18n.py')
-rw-r--r-- | tests/test_util_i18n.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_util_i18n.py b/tests/test_util_i18n.py index e84892b5c..a534b2771 100644 --- a/tests/test_util_i18n.py +++ b/tests/test_util_i18n.py @@ -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() |