Add C++ test for backslash stripping

This commit is contained in:
Jakob Lykke Andersen 2020-03-20 12:55:42 +01:00
parent f12a7f1ae2
commit 088f26278f
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1 @@
.. cpp:var:: char c = '\\'

View File

@ -845,6 +845,22 @@ def test_build_domain_cpp_warn_template_param_qualified_name(app, status, warnin
assert "WARNING: cpp:type reference target not found: T::U::typeWarn" in ws[1] assert "WARNING: cpp:type reference target not found: T::U::typeWarn" in ws[1]
@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'nitpicky': True})
def test_build_domain_cpp_backslash_ok(app, status, warning):
app.builder.build_all()
ws = filter_warnings(warning, "backslash")
assert len(ws) == 0
@pytest.mark.sphinx(testroot='domain-cpp',
confoverrides={'nitpicky': True, 'strip_signature_backslash': True})
def test_build_domain_cpp_backslash_ok(app, status, warning):
app.builder.build_all()
ws = filter_warnings(warning, "backslash")
assert len(ws) == 1
assert "WARNING: Parsing of expression failed. Using fallback parser." in ws[0]
@pytest.mark.sphinx(testroot='domain-cpp') @pytest.mark.sphinx(testroot='domain-cpp')
def test_build_domain_cpp_misuse_of_roles(app, status, warning): def test_build_domain_cpp_misuse_of_roles(app, status, warning):
app.builder.build_all() app.builder.build_all()