mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #3555 from mitya57/stable
test_markup: Make verify functions test both HTML and LaTeX outputs
This commit is contained in:
commit
c1a6377caa
@ -97,9 +97,9 @@ def verify_re_latex(app, parse):
|
|||||||
def verify_re(verify_re_html, verify_re_latex):
|
def verify_re(verify_re_html, verify_re_latex):
|
||||||
def verify_re_(rst, html_expected, latex_expected):
|
def verify_re_(rst, html_expected, latex_expected):
|
||||||
if html_expected:
|
if html_expected:
|
||||||
return verify_re_html(rst, html_expected)
|
verify_re_html(rst, html_expected)
|
||||||
if latex_expected:
|
if latex_expected:
|
||||||
return verify_re_latex(rst, latex_expected)
|
verify_re_latex(rst, latex_expected)
|
||||||
return verify_re_
|
return verify_re_
|
||||||
|
|
||||||
|
|
||||||
@ -107,9 +107,9 @@ def verify_re(verify_re_html, verify_re_latex):
|
|||||||
def verify(verify_re_html, verify_re_latex):
|
def verify(verify_re_html, verify_re_latex):
|
||||||
def verify_(rst, html_expected, latex_expected):
|
def verify_(rst, html_expected, latex_expected):
|
||||||
if html_expected:
|
if html_expected:
|
||||||
return verify_re_html(rst, re.escape(html_expected) + '$')
|
verify_re_html(rst, re.escape(html_expected) + '$')
|
||||||
if latex_expected:
|
if latex_expected:
|
||||||
return verify_re_latex(rst, re.escape(latex_expected) + '$')
|
verify_re_latex(rst, re.escape(latex_expected) + '$')
|
||||||
return verify_
|
return verify_
|
||||||
|
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ def get_verifier(verify, verify_re):
|
|||||||
'verify',
|
'verify',
|
||||||
'"John"',
|
'"John"',
|
||||||
'<p>“John”</p>',
|
'<p>“John”</p>',
|
||||||
"``John''",
|
r'\sphinxquotedblleft{}John\sphinxquotedblright{}',
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
# ... but not in literal text
|
# ... but not in literal text
|
||||||
|
Loading…
Reference in New Issue
Block a user