test_markup: Make verify functions test both HTML and LaTeX outputs

Previously it would return after performing the HTML check, without
running the LaTeX one.
This commit is contained in:
Dmitry Shachnev
2017-03-14 20:30:58 +03:00
parent 741acb04e9
commit 6e0467ca77

View File

@@ -97,9 +97,9 @@ def verify_re_latex(app, parse):
def verify_re(verify_re_html, verify_re_latex):
def verify_re_(rst, html_expected, latex_expected):
if html_expected:
return verify_re_html(rst, html_expected)
verify_re_html(rst, html_expected)
if latex_expected:
return verify_re_latex(rst, latex_expected)
verify_re_latex(rst, latex_expected)
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_(rst, html_expected, latex_expected):
if html_expected:
return verify_re_html(rst, re.escape(html_expected) + '$')
verify_re_html(rst, re.escape(html_expected) + '$')
if latex_expected:
return verify_re_latex(rst, re.escape(latex_expected) + '$')
verify_re_latex(rst, re.escape(latex_expected) + '$')
return verify_