Skip to content

Commit

Permalink
tests: add check for double start tag
Browse files Browse the repository at this point in the history
Issue #1019
  • Loading branch information
jmcnamara committed Oct 19, 2023
1 parent 9c5fb67 commit 3e20bf8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xlsxwriter/test/helperfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ def _compare_xlsx_files(got_file, exp_file, ignore_files, ignore_elements):
got_xml_str = got_xml_str.decode("utf-8")
exp_xml_str = exp_xml_str.decode("utf-8")

# Check for errant xml tags in the generated file.
if "<<" in got_xml_str:
return "Double start tag in XlsxWriter file %s" % filename, ""

# Remove dates and user specific data from the core.xml data.
if filename == "docProps/core.xml":
exp_xml_str = re.sub(r" ?John", "", exp_xml_str)
Expand Down

0 comments on commit 3e20bf8

Please sign in to comment.