mirror of
https://github.com/tc39/test262.git
synced 2025-07-24 06:25:30 +02:00
[generation] Strip whitespace from generated YAML
This commit is contained in:
parent
84d95077d0
commit
82051d8f6a
@ -119,7 +119,7 @@ class Template:
|
|||||||
features += case_values['meta'].get('features', [])
|
features += case_values['meta'].get('features', [])
|
||||||
features += self.attribs['meta'].get('features', [])
|
features += self.attribs['meta'].get('features', [])
|
||||||
if len(features):
|
if len(features):
|
||||||
lines += ['features: ' + yaml.dump(features)]
|
lines += ['features: ' + yaml.dump(features).strip()]
|
||||||
|
|
||||||
flags = ['generated']
|
flags = ['generated']
|
||||||
flags += case_values['meta'].get('flags', [])
|
flags += case_values['meta'].get('flags', [])
|
||||||
|
14
tools/generation/test/expected/normal/features-normal.js
Normal file
14
tools/generation/test/expected/normal/features-normal.js
Normal 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.';
|
8
tools/generation/test/fixtures/normal/features.template
vendored
Normal file
8
tools/generation/test/fixtures/normal/features.template
vendored
Normal 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]
|
||||||
|
---*/
|
Loading…
x
Reference in New Issue
Block a user