diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-04-23 11:33:49 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-04-23 16:31:33 +0900 |
commit | 44b6044d4b5c84a3ec633a7bc50fde23d23ab7cb (patch) | |
tree | 761f8fd880cc788b4ae193695bcdb046aa18be0a /tests/test_ext_intersphinx.py | |
parent | 96fa6d2972ea7c77525607ec490daed9e303535d (diff) | |
download | sphinx-git-44b6044d4b5c84a3ec633a7bc50fde23d23ab7cb.tar.gz |
Implement get_full_qualified_name() to CPPDomain (refs: #3630)
Diffstat (limited to 'tests/test_ext_intersphinx.py')
-rw-r--r-- | tests/test_ext_intersphinx.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_ext_intersphinx.py b/tests/test_ext_intersphinx.py index 4774604e8..47f2029dc 100644 --- a/tests/test_ext_intersphinx.py +++ b/tests/test_ext_intersphinx.py @@ -212,6 +212,26 @@ def test_missing_reference_stddomain(tempdir, app, status, warning): assert rn.astext() == 'ls -l' +@pytest.mark.sphinx('html', testroot='ext-intersphinx-cppdomain') +def test_missing_reference_cppdomain(tempdir, app, status, warning): + inv_file = tempdir / 'inventory' + inv_file.write_bytes(inventory_v2) + app.config.intersphinx_mapping = { + 'https://docs.python.org/': inv_file, + } + app.config.intersphinx_cache_limit = 0 + + # load the inventory and check if it's done correctly + load_mappings(app) + + app.build() + html = (app.outdir / 'index.html').text() + assert ('<a class="reference external"' + ' href="https://docs.python.org/index.html#cpp_foo_bar"' + ' title="(in foo v2.0)"><code class="xref cpp cpp-class docutils literal">' + '<span class="pre">Bar</span></code></a>' in html) + + def test_missing_reference_jsdomain(tempdir, app, status, warning): inv_file = tempdir / 'inventory' inv_file.write_bytes(inventory_v2) |