[generation] Strip whitespace from generated YAML

This commit is contained in:
Mike Pennisi 2016-04-25 17:06:51 -04:00
parent 84d95077d0
commit 82051d8f6a
3 changed files with 23 additions and 1 deletions

View File

@ -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', [])

View File

@ -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.';

View File

@ -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]
---*/