mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add tests for `:manpage:
` inside a title (#11705)
This commit is contained in:
parent
b587eb243a
commit
08386826fb
@ -1,5 +1,7 @@
|
||||
* :manpage:`man(1)`
|
||||
* :manpage:`ls.1`
|
||||
* :manpage:`sphinx`
|
||||
* :manpage:`mailx(1) <bsd-mailx/mailx.1>`
|
||||
* :manpage:`!man(1)`
|
||||
The :manpage:`cp(1)`
|
||||
--------------------
|
||||
* :manpage:`man(1)`
|
||||
* :manpage:`ls.1`
|
||||
* :manpage:`sphinx`
|
||||
* :manpage:`mailx(1) <bsd-mailx/mailx.1>`
|
||||
* :manpage:`!man(1)`
|
||||
|
@ -293,6 +293,20 @@ def test_html_sidebar(app, status, warning):
|
||||
assert ctx['sidebars'] == []
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("fname", "expect"), [
|
||||
('index.html', (".//h1/em/a[@href='https://example.com/cp.1']", '', True)),
|
||||
('index.html', (".//em/a[@href='https://example.com/man.1']", '', True)),
|
||||
('index.html', (".//em/a[@href='https://example.com/ls.1']", '', True)),
|
||||
('index.html', (".//em/a[@href='https://example.com/sphinx.']", '', True)),
|
||||
])
|
||||
@pytest.mark.sphinx('html', testroot='manpage_url', confoverrides={
|
||||
'manpages_url': 'https://example.com/{page}.{section}'})
|
||||
@pytest.mark.test_params(shared_result='test_build_html_manpage_url')
|
||||
def test_html_manpage(app, cached_etree_parse, fname, expect):
|
||||
app.build()
|
||||
check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='toctree-glob',
|
||||
confoverrides={'html_baseurl': 'https://example.com/'})
|
||||
def test_html_baseurl(app, status, warning):
|
||||
|
Loading…
Reference in New Issue
Block a user