diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-02-17 23:37:35 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-02-17 23:37:35 +0900 |
commit | d1b5f7227da3cc19eeec79cca211d2dac900e06b (patch) | |
tree | b97eaa13153a23af2e3eab774d4a817eb01cf700 /tests/test_directive_code.py | |
parent | 88b84a532fbfd2df5917b2fc6800f756d313adc7 (diff) | |
parent | 32817f9efac39b259e57c4bbdaa5395d5604b48e (diff) | |
download | sphinx-git-d1b5f7227da3cc19eeec79cca211d2dac900e06b.tar.gz |
Merge branch 'master' into refactor_literalinclude
Diffstat (limited to 'tests/test_directive_code.py')
-rw-r--r-- | tests/test_directive_code.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py index 8a2283daa..5f0df2b08 100644 --- a/tests/test_directive_code.py +++ b/tests/test_directive_code.py @@ -263,7 +263,7 @@ def test_code_block_caption_latex(app, status, warning): latex = (app.outdir / 'Python.tex').text(encoding='utf-8') caption = '\\sphinxSetupCaptionForVerbatim{caption \\sphinxstyleemphasis{test} rb}' label = '\\def\\sphinxLiteralBlockLabel{\\label{\\detokenize{caption:id1}}}' - link = '\hyperref[\\detokenize{caption:name-test-rb}]' \ + link = '\\hyperref[\\detokenize{caption:name-test-rb}]' \ '{Listing \\ref{\\detokenize{caption:name-test-rb}}}' assert caption in latex assert label in latex @@ -393,9 +393,8 @@ def test_literal_include_lineno_match(app, status, warning): html = (app.outdir / 'lineno_match.html').text(encoding='utf-8') pyobject = ( '<td class="linenos"><div class="linenodiv"><pre>' - ' 9\n' - '10\n' - '11</pre></div></td>') + '6\n' + '7</pre></div></td>') assert pyobject in html @@ -419,6 +418,12 @@ def test_literal_include_lineno_match(app, status, warning): '14</pre></div></td>') assert start_after in html + start_after_with_lines = ( + '<td class="linenos"><div class="linenodiv"><pre>' + '2\n' + '3</pre></div></td>') + assert start_after_with_lines in html + start_at_end_at = ( '<td class="linenos"><div class="linenodiv"><pre>' ' 9\n' @@ -459,7 +464,7 @@ def test_literalinclude_caption_latex(app, status, warning): latex = (app.outdir / 'Python.tex').text(encoding='utf-8') caption = '\\sphinxSetupCaptionForVerbatim{caption \\sphinxstylestrong{test} py}' label = '\\def\\sphinxLiteralBlockLabel{\\label{\\detokenize{caption:id2}}}' - link = '\hyperref[\\detokenize{caption:name-test-py}]' \ + link = '\\hyperref[\\detokenize{caption:name-test-py}]' \ '{Listing \\ref{\\detokenize{caption:name-test-py}}}' assert caption in latex assert label in latex |