mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #728: escape root dir when putting it into a regex in latex/texinfo tests.
This commit is contained in:
parent
05cf3c0360
commit
bc3eeddb35
@ -38,7 +38,7 @@ def test_latex(app):
|
||||
LaTeXTranslator.ignore_missing_images = True
|
||||
app.builder.build_all()
|
||||
latex_warnings = latex_warnfile.getvalue().replace(os.sep, '/')
|
||||
latex_warnings_exp = LATEX_WARNINGS % {'root': app.srcdir}
|
||||
latex_warnings_exp = LATEX_WARNINGS % {'root': re.escape(app.srcdir)}
|
||||
assert re.match(latex_warnings_exp + '$', latex_warnings), \
|
||||
'Warnings don\'t match:\n' + \
|
||||
'--- Expected (regex):\n' + latex_warnings_exp + \
|
||||
|
Loading…
Reference in New Issue
Block a user