add unit test for maxlistdepth (latex)

This commit is contained in:
jfbu 2016-11-04 23:57:00 +01:00
parent 7651b2de9b
commit 0473e438dc
3 changed files with 80 additions and 0 deletions

View File

@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
master_doc = 'index'
html_theme = 'classic'
exclude_patterns = ['_build']
latex_documents = [
('index', 'SphinxTests.tex', 'Testing maxlistdepth=10',
'Georg Brandl', 'howto'),
]
latex_elements = {
'maxlistdepth': '10',
}

View File

@ -0,0 +1,57 @@
test-maxlistdepth
=================
1. 1
1. 2
1. 3
1. 4
1. 5
1. 6
1. 7
1. 8
1. 9
10a
- 10b
.. code-block:: python
def foo():
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
1. 9
10a
1. 10b
.. code-block:: python
def foo():

View File

@ -710,3 +710,12 @@ def test_latex_toplevel_sectioning_is_section(app, status, warning):
print(status.getvalue())
print(warning.getvalue())
assert '\\section{Foo}' in result
@with_app(buildername='latex', testroot='maxlistdepth')
def test_maxlistdepth_at_ten(app, status, warning):
app.builder.build_all()
result = (app.outdir / 'SphinxTests.tex').text(encoding='utf8')
print(result)
print(status.getvalue())
print(warning.getvalue())
compile_latex_document(app)