diff --git a/tools/generation/lib/template.py b/tools/generation/lib/template.py index fa891f00be..bdd3eb1bcd 100644 --- a/tools/generation/lib/template.py +++ b/tools/generation/lib/template.py @@ -119,7 +119,7 @@ class Template: features += case_values['meta'].get('features', []) features += self.attribs['meta'].get('features', []) if len(features): - lines += ['features: ' + yaml.dump(features)] + lines += ['features: ' + yaml.dump(features).strip()] flags = ['generated'] flags += case_values['meta'].get('flags', []) diff --git a/tools/generation/test/expected/normal/features-normal.js b/tools/generation/test/expected/normal/features-normal.js new file mode 100644 index 0000000000..edc8a5a51b --- /dev/null +++ b/tools/generation/test/expected/normal/features-normal.js @@ -0,0 +1,14 @@ +// This file was procedurally generated from the following sources: +// - tools/generation/test/fixtures/normal.case +// - tools/generation/test/fixtures/normal/features.template +/*--- +description: foobar (First template name) +es6id: 1.2.3 +features: [f1] +flags: [generated, a, b] +includes: [foo.js] +info: > + case info +---*/ + +'This is "teardown" code.'; diff --git a/tools/generation/test/fixtures/normal/features.template b/tools/generation/test/fixtures/normal/features.template new file mode 100644 index 0000000000..ce2dcc2b7e --- /dev/null +++ b/tools/generation/test/fixtures/normal/features.template @@ -0,0 +1,8 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +name: First template name +path: normal/features- +es6id: 1.2.3 +features: [f1] +---*/