Skip to content
Snippets Groups Projects
Commit 73d9169c authored by Mathias Bynens's avatar Mathias Bynens Committed by Rick Waldron
Browse files

Generation: fix more YAML frontmatter writer to eliminate errant newlines from yaml.dump()

This applies the fix from #1821 to the remaining frontmatter properties that consist of lists.

Ref. https://github.com/tc39/test262/pull/1821/files#r222811633.
Ref. #1817.
parent 2ac5f176
No related branches found
No related tags found
No related merge requests found
...@@ -160,14 +160,14 @@ class Template: ...@@ -160,14 +160,14 @@ class Template:
flags += case_values['meta'].get('flags', []) flags += case_values['meta'].get('flags', [])
flags += self.attribs['meta'].get('flags', []) flags += self.attribs['meta'].get('flags', [])
flags = list(OrderedDict.fromkeys(flags)) flags = list(OrderedDict.fromkeys(flags))
lines += ['flags: ' + yaml.dump(flags).strip()] lines += ['flags: ' + re.sub('\n\s*', ' ', yaml.dump(flags).strip())]
includes = [] includes = []
includes += case_values['meta'].get('includes', []) includes += case_values['meta'].get('includes', [])
includes += self.attribs['meta'].get('includes', []) includes += self.attribs['meta'].get('includes', [])
includes = list(OrderedDict.fromkeys(includes)) includes = list(OrderedDict.fromkeys(includes))
if len(includes): if len(includes):
lines += ['includes: ' + yaml.dump(includes).strip()] lines += ['includes: ' + re.sub('\n\s*', ' ', yaml.dump(includes).strip())]
if case_values['meta'].get('negative'): if case_values['meta'].get('negative'):
if self.attribs['meta'].get('negative'): if self.attribs['meta'].get('negative'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment