mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-07-30 08:07:58 -05:00
HTML builder outputs HTML5 by default
This commit is contained in:
@@ -17,6 +17,7 @@ import sphinx.domains.cpp as cppDomain
|
||||
from sphinx import addnodes
|
||||
from sphinx.domains.cpp import DefinitionParser, DefinitionError, NoOldIdError
|
||||
from sphinx.domains.cpp import Symbol, _max_id, _id_prefix
|
||||
from sphinx.util import docutils
|
||||
|
||||
|
||||
def parse(name, string):
|
||||
@@ -734,12 +735,14 @@ def test_build_domain_cpp_misuse_of_roles(app, status, warning):
|
||||
# TODO: properly check for the warnings we expect
|
||||
|
||||
|
||||
@pytest.mark.skipif(docutils.__version_info__ < (0, 13),
|
||||
reason='docutils-0.13 or above is required')
|
||||
@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'add_function_parentheses': True})
|
||||
def test_build_domain_cpp_with_add_function_parentheses_is_True(app, status, warning):
|
||||
app.builder.build_all()
|
||||
|
||||
def check(spec, text, file):
|
||||
pattern = '<li>%s<a .*?><code .*?><span .*?>%s</span></code></a></li>' % spec
|
||||
pattern = '<li><p>%s<a .*?><code .*?><span .*?>%s</span></code></a></p></li>' % spec
|
||||
res = re.search(pattern, text)
|
||||
if not res:
|
||||
print("Pattern\n\t%s\nnot found in %s" % (pattern, file))
|
||||
@@ -775,13 +778,14 @@ def test_build_domain_cpp_with_add_function_parentheses_is_True(app, status, war
|
||||
check(s, t, f)
|
||||
|
||||
|
||||
@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={
|
||||
'add_function_parentheses': False})
|
||||
@pytest.mark.skipif(docutils.__version_info__ < (0, 13),
|
||||
reason='docutils-0.13 or above is required')
|
||||
@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'add_function_parentheses': False})
|
||||
def test_build_domain_cpp_with_add_function_parentheses_is_False(app, status, warning):
|
||||
app.builder.build_all()
|
||||
|
||||
def check(spec, text, file):
|
||||
pattern = '<li>%s<a .*?><code .*?><span .*?>%s</span></code></a></li>' % spec
|
||||
pattern = '<li><p>%s<a .*?><code .*?><span .*?>%s</span></code></a></p></li>' % spec
|
||||
res = re.search(pattern, text)
|
||||
if not res:
|
||||
print("Pattern\n\t%s\nnot found in %s" % (pattern, file))
|
||||
|
||||
Reference in New Issue
Block a user