mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add C++ test for backslash stripping
This commit is contained in:
parent
f12a7f1ae2
commit
088f26278f
1
tests/roots/test-domain-cpp/backslash.rst
Normal file
1
tests/roots/test-domain-cpp/backslash.rst
Normal file
@ -0,0 +1 @@
|
||||
.. cpp:var:: char c = '\\'
|
@ -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]
|
||||
|
||||
|
||||
@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')
|
||||
def test_build_domain_cpp_misuse_of_roles(app, status, warning):
|
||||
app.builder.build_all()
|
||||
|
Loading…
Reference in New Issue
Block a user