summaryrefslogtreecommitdiff
path: root/tests/test_domain_c.py
diff options
context:
space:
mode:
authorJakob Lykke Andersen <Jakob@caput.dk>2020-03-25 20:07:16 +0100
committerJakob Lykke Andersen <Jakob@caput.dk>2020-03-25 20:07:16 +0100
commit67e5edde6db57d2b9e1fbc1398d7ff775ac398a3 (patch)
tree252f06a69f23222ff53ab9fa32167db261f2d0ad /tests/test_domain_c.py
parent6be31aa05c5b90f499fa2f169e81d88557c4b788 (diff)
downloadsphinx-git-67e5edde6db57d2b9e1fbc1398d7ff775ac398a3.tar.gz
C, C++, do not recurse in anon symbols on addition
Diffstat (limited to 'tests/test_domain_c.py')
-rw-r--r--tests/test_domain_c.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_domain_c.py b/tests/test_domain_c.py
index 9daed2800..3255efc55 100644
--- a/tests/test_domain_c.py
+++ b/tests/test_domain_c.py
@@ -474,6 +474,15 @@ def test_build_domain_c(app, status, warning):
assert len(ws) == 0
+@pytest.mark.sphinx(testroot='domain-c', confoverrides={'nitpicky': True})
+def test_build_domain_c_anon_dup_decl(app, status, warning):
+ app.builder.build_all()
+ ws = filter_warnings(warning, "anon-dup-decl")
+ assert len(ws) == 2
+ assert "WARNING: c:identifier reference target not found: @a" in ws[0]
+ assert "WARNING: c:identifier reference target not found: @b" in ws[1]
+
+
def test_cfunction(app):
text = (".. c:function:: PyObject* "
"PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)")