mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix links to external option docs with intersphinx (refs: #3769)
This commit is contained in:
@@ -194,7 +194,7 @@ def test_missing_reference_stddomain(tempdir, app, status, warning):
|
||||
inv_file = tempdir / 'inventory'
|
||||
inv_file.write_bytes(inventory_v2)
|
||||
app.config.intersphinx_mapping = {
|
||||
'https://docs.python.org/': inv_file,
|
||||
'cmd': ('https://docs.python.org/', inv_file),
|
||||
}
|
||||
app.config.intersphinx_cache_limit = 0
|
||||
|
||||
@@ -213,6 +213,12 @@ def test_missing_reference_stddomain(tempdir, app, status, warning):
|
||||
rn = missing_reference(app, app.env, node, contnode)
|
||||
assert rn.astext() == 'ls -l'
|
||||
|
||||
# refers inventory by name
|
||||
kwargs = {}
|
||||
node, contnode = fake_node('std', 'option', 'cmd:ls -l', '-l', **kwargs)
|
||||
rn = missing_reference(app, app.env, node, contnode)
|
||||
assert rn.astext() == '-l'
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='ext-intersphinx-cppdomain')
|
||||
def test_missing_reference_cppdomain(tempdir, app, status, warning):
|
||||
|
||||
Reference in New Issue
Block a user