mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
update root footnote test
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"),
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user