mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add test for #4066 latex \index
indent fix
This commit is contained in:
3
tests/roots/test-latex-index/conf.py
Normal file
3
tests/roots/test-latex-index/conf.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
master_doc = 'index'
|
12
tests/roots/test-latex-index/index.rst
Normal file
12
tests/roots/test-latex-index/index.rst
Normal file
@@ -0,0 +1,12 @@
|
||||
test-latex-index
|
||||
================
|
||||
|
||||
A :index:`famous` :index:`equation`:
|
||||
|
||||
.. math::
|
||||
|
||||
E = m c^2
|
||||
|
||||
.. index:: Einstein, relativity
|
||||
|
||||
and some text.
|
@@ -1020,3 +1020,12 @@ def test_latex_remote_images(app, status, warning):
|
||||
assert '\\sphinxincludegraphics{{NOT_EXIST}.PNG}' not in result
|
||||
assert ('WARNING: Could not fetch remote image: '
|
||||
'http://example.com/NOT_EXIST.PNG [404]' in warning.getvalue())
|
||||
|
||||
|
||||
@pytest.mark.sphinx('latex', testroot='latex-index')
|
||||
def test_latex_index(app, status, warning):
|
||||
app.builder.build_all()
|
||||
|
||||
result = (app.outdir / 'Python.tex').text(encoding='utf8')
|
||||
assert 'A \\index{famous}famous \\index{equation}equation:\n' in result
|
||||
assert '\n\\index{Einstein}\\index{relativity}\\ignorespaces \nand' in result
|
||||
|
Reference in New Issue
Block a user