tc39 / test262

Official ECMAScript Conformance Test Suite
Other
2.31k stars 459 forks source link

YAML formatting restrictions #1997

Open leobalter opened 5 years ago

leobalter commented 5 years ago

We should restrict the YAML format for the test files frontmatter to improve interoperability.

Many test runners depend on quick but limited yaml parsers and it's ok to have style restrictions identified in the importing processes for Test262.

Some of them I can already tell from scratch:

features:
-  - var
-  - foo
-  - bar
+  [var, foo, bar]

There are might be more items we want to identify here. We should increase the list as necessary.

cc @caitp @gsathya @psmarshall

gsathya commented 5 years ago

Looks like JSC's parser is having trouble with the YAML as well: https://bugs.webkit.org/show_bug.cgi?id=193053

leobalter commented 5 years ago

@gsathya yes, the issues we can list here might affect at least V8, JSC and SpiderMonkey. Turns out it Yaml parsers are more challenging than one can expect.


Edit: For clarification, my goal is to tackle these issues and provide a consistent format to avoid any problem when consuming test262 in other projects.

mathiasbynens commented 5 years ago

Previously: #1817, #1821, #1868.

gsathya commented 5 years ago

Another one: https://github.com/tc39/test262/issues/2034

littledan commented 5 years ago

Thanks for working on this important issue, @leobalter.

kmiller68 commented 4 years ago

Would it also be possible to prohibit inline value strings that span multiple lines? That seems to cause issues for JSC's YAML parser...

For example:

description: Security Throws a TypeError if start coercion detaches
  the buffer

Ideally, this would be formatted as one line or with "|"/">"

rkirsling commented 4 years ago

Opened #2505 to address the specific issue @kmiller68 identified.