update todo extension test to test multiple todolists

This tests for regression of previous bug #4214: Two todolist directives break
sphinx-1.6.5.
This commit is contained in:
Matthew Fernandez committed 2017-11-26 20:54:32 -08:00
1 parent fd94702eed
commit 1b664248f4
2 files changed
+6 -2

No files matched your search

+2
View File
@@ -7,3 +7,5 @@ test for sphinx.ext.todo
bar
.. todolist::
.. todolist::
+4 -2
View File
@@ -99,11 +99,13 @@ def test_todo_valid_link(app, status, warning):
content = (app.outdir / 'TodoTests.tex').text()
# Look for the link to foo. We could equally well look for the link to bar.
# Look for the link to foo. Note that there are two of them because the
# source document uses todolist twice. We could equally well look for links
# to bar.
link = r'\{\\hyperref\[\\detokenize\{(.*?foo.*?)}]\{\\sphinxcrossref{' \
r'\\sphinxstyleemphasis{original entry}}}}'
m = re.findall(link, content)
assert len(m) == 1
assert len(m) == 2
target = m[0]
# Look for the targets of this link.