Merge branch 'stable'

This commit is contained in:
Takeshi KOMIYA
2016-06-05 17:24:41 +09:00
15 changed files with 165 additions and 34 deletions

View File

@@ -24,10 +24,10 @@ from test_build_html import ENV_WARNINGS
LATEX_WARNINGS = ENV_WARNINGS + """\
%(root)s/markup.txt:164: WARNING: unknown option: &option
%(root)s/footnote.txt:60: WARNING: citation not found: missing
%(root)s/images.txt:20: WARNING: no matching candidate for image URI u'foo.\\*'
%(root)s/markup.txt:285: WARNING: Could not lex literal_block as "c". Highlighting skipped.
%(root)s/markup.txt:\\d+: WARNING: unknown option: &option
%(root)s/footnote.txt:\\d+: WARNING: citation not found: missing
%(root)s/images.txt:\\d+: WARNING: no matching candidate for image URI u'foo.\\*'
%(root)s/markup.txt:\\d+: WARNING: Could not lex literal_block as "c". Highlighting skipped.
"""
if PY3:
@@ -111,13 +111,22 @@ def test_writer(app, status, warning):
app.builder.build_all()
result = (app.outdir / 'SphinxTests.tex').text(encoding='utf8')
assert ('\\begin{figure-in-table}\n\\centering\n\\capstart\n'
'\\includegraphics{{img}.png}\n'
'\\figcaption{figure in table}\\label{markup:id7}\\end{figure-in-table}' in result)
assert ('\\begin{wrapfigure}{r}{0pt}\n\\centering\n'
'\\includegraphics{{rimg}.png}\n\\caption{figure with align option}'
'\\label{markup:id7}\\end{wrapfigure}' in result)
'\\label{markup:id8}\\end{wrapfigure}' in result)
assert ('\\begin{wrapfigure}{r}{0.500\\linewidth}\n\\centering\n'
'\\includegraphics{{rimg}.png}\n\\caption{figure with align \\& figwidth option}'
'\\label{markup:id8}\\end{wrapfigure}' in result)
'\\label{markup:id9}\\end{wrapfigure}' in result)
assert ('\\begin{wrapfigure}{r}{3cm}\n\\centering\n'
'\\includegraphics[width=3cm]{{rimg}.png}\n'
'\\caption{figure with align \\& width option}'
'\\label{markup:id10}\\end{wrapfigure}' in result)
@with_app(buildername='latex', freshenv=True, # use freshenv to check warnings