Add testcase for thebibliography

This commit is contained in:
Takeshi KOMIYA 2018-04-26 01:13:54 +09:00
parent 6ece10c29f
commit 82a123f1d4

View File

@ -1247,3 +1247,20 @@ def test_latex_nested_enumerated_list(app, status, warning):
assert r'\setcounter{enumii}{3}' in result
assert r'\setcounter{enumiii}{9}' in result
assert r'\setcounter{enumii}{2}' in result
@pytest.mark.sphinx('latex', testroot='footnotes')
def test_latex_thebibliography(app, status, warning):
app.builder.build_all()
result = (app.outdir / 'Python.tex').text(encoding='utf8')
print(result)
assert ('\\begin{sphinxthebibliography}{AuthorYear}\n'
'\\bibitem[AuthorYear]{\\detokenize{AuthorYear}}'
'{\\phantomsection\\label{\\detokenize{index:authoryear}} \n'
'Author, Title, Year\n'
'}\n'
'\\end{sphinxthebibliography}\n' in result)
assert ('{\\hyperref[\\detokenize{index:authoryear}]'
'{\\sphinxcrossref{{[}AuthorYear{]}}}}.}'
in result)