modify test strings to be found after build_latex

This commit is contained in:
Takaaki AOKI 2015-12-04 20:13:13 +09:00 committed by Takeshi KOMIYA
parent a1240d2cab
commit 07ed539ad3
2 changed files with 7 additions and 7 deletions

View File

@ -168,7 +168,7 @@ def test_numref(app, status, warning):
print(warning.getvalue())
assert '\\addto\\captionsenglish{\\renewcommand{\\figurename}{Fig. }}' in result
assert '\\addto\\captionsenglish{\\renewcommand{\\tablename}{Table }}' in result
assert '\\floatname{literal-block}{Listing }' in result
assert '\\SetupFloatingEnvironment{literal-block}{name=Listing }' in result
assert '\\hyperref[index:fig1]{Fig. \\ref{index:fig1}}' in result
assert '\\hyperref[baz:fig22]{Figure\\ref{baz:fig22}}' in result
assert '\\hyperref[index:table-1]{Table \\ref{index:table-1}}' in result
@ -190,7 +190,7 @@ def test_numref_with_prefix1(app, status, warning):
print(warning.getvalue())
assert '\\addto\\captionsenglish{\\renewcommand{\\figurename}{Figure:}}' in result
assert '\\addto\\captionsenglish{\\renewcommand{\\tablename}{Tab\\_}}' in result
assert '\\floatname{literal-block}{Code-}' in result
assert '\\SetupFloatingEnvironment{literal-block}{name=Code-}' in result
assert '\\ref{index:fig1}' in result
assert '\\ref{baz:fig22}' in result
assert '\\ref{index:table-1}' in result
@ -220,7 +220,7 @@ def test_numref_with_prefix2(app, status, warning):
assert '\\def\\fnum@figure{\\figurename\\thefigure.}' in result
assert '\\addto\\captionsenglish{\\renewcommand{\\tablename}{Tab\\_}}' in result
assert '\\def\\fnum@table{\\tablename\\thetable:}' in result
assert '\\floatname{literal-block}{Code-}' in result
assert '\\SetupFloatingEnvironment{literal-block}{name=Code-}' in result
assert '\\hyperref[index:fig1]{Figure:\\ref{index:fig1}.}' in result
assert '\\hyperref[baz:fig22]{Figure\\ref{baz:fig22}}' in result
assert '\\hyperref[index:table-1]{Tab\\_\\ref{index:table-1}:}' in result
@ -239,7 +239,7 @@ def test_numref_with_language_el(app, status, warning):
print(warning.getvalue())
assert '\\addto\\captionsgreek{\\renewcommand{\\figurename}{Fig. }}' in result
assert '\\addto\\captionsgreek{\\renewcommand{\\tablename}{Table }}' in result
assert '\\floatname{literal-block}{Listing }' in result
assert '\\SetupFloatingEnvironment{literal-block}{name=Listing }' in result
assert '\\hyperref[index:fig1]{Fig. \\ref{index:fig1}}' in result
assert '\\hyperref[baz:fig22]{Figure\\ref{baz:fig22}}' in result
assert '\\hyperref[index:table-1]{Table \\ref{index:table-1}}' in result
@ -258,7 +258,7 @@ def test_numref_with_language_ja(app, status, warning):
print(warning.getvalue())
assert u'\\renewcommand{\\figurename}{\u56f3 }' in result
assert '\\renewcommand{\\tablename}{TABLE }' in result
assert '\\floatname{literal-block}{LIST }' in result
assert '\\SetupFloatingEnvironment{literal-block}{name=LIST }' in result
assert u'\\hyperref[index:fig1]{\u56f3 \\ref{index:fig1}}' in result
assert '\\hyperref[baz:fig22]{Figure\\ref{baz:fig22}}' in result
assert '\\hyperref[index:table-1]{TABLE \\ref{index:table-1}}' in result

View File

@ -64,7 +64,7 @@ def test_code_block_caption_html(app, status, warning):
def test_code_block_caption_latex(app, status, warning):
app.builder.build_all()
latex = (app.outdir / 'Python.tex').text(encoding='utf-8')
caption = '\\caption{caption \\emph{test} rb}'
caption = '\\captionof{literal-block}{caption \\emph{test} rb}'
assert caption in latex
@ -205,5 +205,5 @@ def test_literalinclude_caption_html(app, status, warning):
def test_literalinclude_caption_latex(app, status, warning):
app.builder.build('index')
latex = (app.outdir / 'Python.tex').text(encoding='utf-8')
caption = '\\caption{caption \\textbf{test} py}'
caption = '\\captionof{literal-block}{caption \\textbf{test} py}'
assert caption in latex