mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
parent
fd94702eed
commit
1b664248f4
@ -7,3 +7,5 @@ test for sphinx.ext.todo
|
||||
bar
|
||||
|
||||
.. todolist::
|
||||
|
||||
.. todolist::
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user