summaryrefslogtreecommitdiff
path: root/tests/test_environment_indexentries.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-07-07 18:50:58 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-07-07 18:50:58 +0900
commit1c152d249c2f1845497dbc40b0c18113ac19663e (patch)
tree9a08faf7a3158188a10f069868ac60c4b006ad45 /tests/test_environment_indexentries.py
parentc9078fa8c80672354a1b1a078e12e2921d7e73ed (diff)
parent96fa46e7b36a4f7571169a76b42fffb547702952 (diff)
downloadsphinx-git-1c152d249c2f1845497dbc40b0c18113ac19663e.tar.gz
Merge branch '2.0'
Diffstat (limited to 'tests/test_environment_indexentries.py')
-rw-r--r--tests/test_environment_indexentries.py27
1 files changed, 19 insertions, 8 deletions
diff --git a/tests/test_environment_indexentries.py b/tests/test_environment_indexentries.py
index ec76acdc0..4083eae04 100644
--- a/tests/test_environment_indexentries.py
+++ b/tests/test_environment_indexentries.py
@@ -47,19 +47,30 @@ def test_create_pair_index(app):
app.env.indexentries.clear()
text = (".. index:: pair: docutils; reStructuredText\n"
".. index:: pair: Python; interpreter\n"
- ".. index:: pair: Sphinx; documentation tool\n")
+ ".. index:: pair: Sphinx; documentation tool\n"
+ ".. index:: pair: Sphinx; :+1:\n"
+ ".. index:: pair: Sphinx; Ель\n"
+ ".. index:: pair: Sphinx; ёлка\n")
restructuredtext.parse(app, text)
index = IndexEntries(app.env).create_index(app.builder)
- assert len(index) == 5
- assert index[0] == ('D',
+ assert len(index) == 7
+ assert index[0] == ('Symbols', [(':+1:', [[], [('Sphinx', [('', '#index-3')])], None])])
+ assert index[1] == ('D',
[('documentation tool', [[], [('Sphinx', [('', '#index-2')])], None]),
('docutils', [[], [('reStructuredText', [('', '#index-0')])], None])])
- assert index[1] == ('I', [('interpreter', [[], [('Python', [('', '#index-1')])], None])])
- assert index[2] == ('P', [('Python', [[], [('interpreter', [('', '#index-1')])], None])])
- assert index[3] == ('R',
+ assert index[2] == ('I', [('interpreter', [[], [('Python', [('', '#index-1')])], None])])
+ assert index[3] == ('P', [('Python', [[], [('interpreter', [('', '#index-1')])], None])])
+ assert index[4] == ('R',
[('reStructuredText', [[], [('docutils', [('', '#index-0')])], None])])
- assert index[4] == ('S',
- [('Sphinx', [[], [('documentation tool', [('', '#index-2')])], None])])
+ assert index[5] == ('S',
+ [('Sphinx', [[],
+ [(':+1:', [('', '#index-3')]),
+ ('documentation tool', [('', '#index-2')]),
+ ('ёлка', [('', '#index-5')]),
+ ('Ель', [('', '#index-4')])],
+ None])])
+ assert index[6] == ('Е', [('ёлка', [[], [('Sphinx', [('', '#index-5')])], None]),
+ ('Ель', [[], [('Sphinx', [('', '#index-4')])], None])])
@pytest.mark.sphinx('dummy')