diff --git a/tests/roots/test-maxlistdepth/conf.py b/tests/roots/test-maxlistdepth/conf.py new file mode 100644 index 000000000..5a43b67bf --- /dev/null +++ b/tests/roots/test-maxlistdepth/conf.py @@ -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', +} diff --git a/tests/roots/test-maxlistdepth/index.rst b/tests/roots/test-maxlistdepth/index.rst new file mode 100644 index 000000000..5d9bc2193 --- /dev/null +++ b/tests/roots/test-maxlistdepth/index.rst @@ -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(): + diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index 756648254..fcef77be6 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -710,3 +710,13 @@ def test_latex_toplevel_sectioning_is_section(app, status, warning): print(status.getvalue()) print(warning.getvalue()) assert '\\section{Foo}' in result + +@skip_if_stylefiles_notfound +@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)