update root footnote test

This commit is contained in:
jfbu
2017-02-18 16:26:00 +01:00
parent e39d58a530
commit 99315fa8e0
3 changed files with 18 additions and 11 deletions

View File

@@ -33,7 +33,7 @@ footnotes in table
* - name [#]_
- desription
* - VIDIOC_CROPCAP
- Information about VIDIOC_CROPCAP
- Information about VIDIOC_CROPCAP [#]_
footenotes
--------------------
@@ -50,6 +50,8 @@ footenotes
.. [bar] cite
.. [#] footnotes in table caption
.. [#] footnote in table caption
.. [#] footnotes in table
.. [#] footnote in table header
.. [#] footnote in table not in header

View File

@@ -415,18 +415,19 @@ def test_static_output(app):
(".//li/a", "double"),
],
'footnote.html': [
(".//a[@class='footnote-reference'][@href='#id7'][@id='id1']", r"\[1\]"),
(".//a[@class='footnote-reference'][@href='#id8'][@id='id2']", r"\[2\]"),
(".//a[@class='footnote-reference'][@href='#id8'][@id='id1']", r"\[1\]"),
(".//a[@class='footnote-reference'][@href='#id9'][@id='id2']", r"\[2\]"),
(".//a[@class='footnote-reference'][@href='#foo'][@id='id3']", r"\[3\]"),
(".//a[@class='reference internal'][@href='#bar'][@id='id4']", r"\[bar\]"),
(".//a[@class='footnote-reference'][@href='#id9'][@id='id5']", r"\[4\]"),
(".//a[@class='footnote-reference'][@href='#id10'][@id='id6']", r"\[5\]"),
(".//a[@class='footnote-reference'][@href='#id10'][@id='id5']", r"\[4\]"),
(".//a[@class='footnote-reference'][@href='#id11'][@id='id6']", r"\[5\]"),
(".//a[@class='fn-backref'][@href='#id1']", r"\[1\]"),
(".//a[@class='fn-backref'][@href='#id2']", r"\[2\]"),
(".//a[@class='fn-backref'][@href='#id3']", r"\[3\]"),
(".//a[@class='fn-backref'][@href='#id4']", r"\[bar\]"),
(".//a[@class='fn-backref'][@href='#id5']", r"\[4\]"),
(".//a[@class='fn-backref'][@href='#id6']", r"\[5\]"),
(".//a[@class='fn-backref'][@href='#id7']", r"\[6\]"),
],
'otherext.html': [
(".//h1", "Generated section"),

View File

@@ -480,11 +480,15 @@ def test_footnote(app, status, warning):
'{\\phantomsection\\label{\\detokenize{footnote:bar}} '
'\ncite\n}') in result
assert '\\caption{Table caption \\sphinxfootnotemark[4]' in result
assert ('\\begin{footnotetext}[4]\\sphinxAtStartFootnote\n'
'footnotes in table caption\n%\n\\end{footnotetext}\\ignorespaces %\n'
assert ('\\hline%\n\\begin{footnotetext}[4]\\sphinxAtStartFootnote\n'
'footnote in table caption\n%\n\\end{footnotetext}\\ignorespaces %\n'
'\\begin{footnotetext}[5]\\sphinxAtStartFootnote\n'
'footnotes in table\n%\n\\end{footnotetext}\\ignorespaces ') in result
assert '\\end{threeparttable}\n\\par\n\\end{savenotes}\n' in result
'footnote in table header\n%\n\\end{footnotetext}\\ignorespaces \n'
'VIDIOC\\_CROPCAP\n&\n') in result
assert ('Information about VIDIOC\\_CROPCAP %\n'
'\\begin{footnote}[6]\\sphinxAtStartFootnote\n'
'footnote in table not in header\n%\n\\end{footnote}\n\\\\\n\hline\n'
'\\end{tabulary}\n\\end{threeparttable}\n\\par\n\\end{savenotes}\n') in result
@pytest.mark.sphinx('latex', testroot='footnotes')