diff options
Diffstat (limited to 'tests/test_environment_toctree.py')
-rw-r--r-- | tests/test_environment_toctree.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_environment_toctree.py b/tests/test_environment_toctree.py index 60a9826fd..8d5cfc0b9 100644 --- a/tests/test_environment_toctree.py +++ b/tests/test_environment_toctree.py @@ -346,3 +346,17 @@ def test_get_toctree_for_includehidden(app): assert_node(toctree[2], [bullet_list, list_item, compact_paragraph, reference, "baz"]) + + +@pytest.mark.sphinx('xml', testroot='toctree-index') +def test_toctree_index(app): + app.build() + toctree = app.env.tocs['index'] + assert_node(toctree, + [bullet_list, ([list_item, (compact_paragraph, # [0][0] + [bullet_list, (addnodes.toctree, # [0][1][0] + addnodes.toctree)])])]) # [0][1][1] + assert_node(toctree[0][1][1], addnodes.toctree, + caption="Indices", glob=False, hidden=False, + titlesonly=False, maxdepth=-1, numbered=0, + entries=[(None, 'genindex'), (None, 'modindex'), (None, 'search')]) |