diff --git a/test/annexB/built-ins/String/prototype/anchor/B.2.3.2.js b/test/annexB/built-ins/String/prototype/anchor/B.2.3.2.js index 785ad6d5d79..4ff4f9c684c 100644 --- a/test/annexB/built-ins/String/prototype/anchor/B.2.3.2.js +++ b/test/annexB/built-ins/String/prototype/anchor/B.2.3.2.js @@ -5,12 +5,12 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.anchor returns a string of HTML describing a single HTML - anchor element. The element's content is the `this` value of the function - invocation, coerced to a string. If specified, the first argument will be - coerced to a string, escaped, and set as the element's `name` attribute. - es6id: B.2.3.2 +description: > + String.prototype.anchor returns a string of HTML describing a single HTML + anchor element. The element's content is the `this` value of the function + invocation, coerced to a string. If specified, the first argument will be + coerced to a string, escaped, and set as the element's `name` attribute. +es6id: B.2.3.2 ---*/ assert.sameValue('_'.anchor('b'), '_'); diff --git a/test/annexB/built-ins/String/prototype/big/B.2.3.3.js b/test/annexB/built-ins/String/prototype/big/B.2.3.3.js index 48b0bb7de2c..e7bb89b5d85 100644 --- a/test/annexB/built-ins/String/prototype/big/B.2.3.3.js +++ b/test/annexB/built-ins/String/prototype/big/B.2.3.3.js @@ -5,11 +5,11 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.big returns a string of HTML describing a single HTML - big element. The element's content is the `this` value of the function - invocation, coerced to a string. - es6id: B.2.3.3 +description: > + String.prototype.big returns a string of HTML describing a single HTML + big element. The element's content is the `this` value of the function + invocation, coerced to a string. +es6id: B.2.3.3 ---*/ assert.sameValue('_'.big(), '_'); diff --git a/test/annexB/built-ins/String/prototype/blink/B.2.3.4.js b/test/annexB/built-ins/String/prototype/blink/B.2.3.4.js index bfc9664d451..b8bec30a1da 100644 --- a/test/annexB/built-ins/String/prototype/blink/B.2.3.4.js +++ b/test/annexB/built-ins/String/prototype/blink/B.2.3.4.js @@ -5,11 +5,11 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.blink returns a string of HTML describing a single HTML - blink element. The element's content is the `this` value of the function - invocation, coerced to a string. - es6id: B.2.3.4 +description: > + String.prototype.blink returns a string of HTML describing a single HTML + blink element. The element's content is the `this` value of the function + invocation, coerced to a string. +es6id: B.2.3.4 ---*/ assert.sameValue('_'.blink(), '_'); diff --git a/test/annexB/built-ins/String/prototype/bold/B.2.3.5.js b/test/annexB/built-ins/String/prototype/bold/B.2.3.5.js index 360069cd48d..eec3038fab4 100644 --- a/test/annexB/built-ins/String/prototype/bold/B.2.3.5.js +++ b/test/annexB/built-ins/String/prototype/bold/B.2.3.5.js @@ -5,11 +5,11 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.bold returns a string of HTML describing a single HTML - bold element. The element's content is the `this` value of the function - invocation, coerced to a string. - es6id: B.2.3.5 +description: > + String.prototype.bold returns a string of HTML describing a single HTML + bold element. The element's content is the `this` value of the function + invocation, coerced to a string. +es6id: B.2.3.5 ---*/ assert.sameValue('_'.bold(), '_'); diff --git a/test/annexB/built-ins/String/prototype/fixed/B.2.3.6.js b/test/annexB/built-ins/String/prototype/fixed/B.2.3.6.js index 95ba2f393ca..d6e8fff350b 100644 --- a/test/annexB/built-ins/String/prototype/fixed/B.2.3.6.js +++ b/test/annexB/built-ins/String/prototype/fixed/B.2.3.6.js @@ -5,11 +5,11 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.fixed returns a string of HTML describing a single HTML - teletype text element. The element's content is the `this` value of the - function invocation, coerced to a string. - es6id: B.2.3.6 +description: > + String.prototype.fixed returns a string of HTML describing a single HTML + teletype text element. The element's content is the `this` value of the + function invocation, coerced to a string. +es6id: B.2.3.6 ---*/ assert.sameValue('_'.fixed(), '_'); diff --git a/test/annexB/built-ins/String/prototype/fontcolor/B.2.3.7.js b/test/annexB/built-ins/String/prototype/fontcolor/B.2.3.7.js index 4b9b26c1c5e..01600e40a16 100644 --- a/test/annexB/built-ins/String/prototype/fontcolor/B.2.3.7.js +++ b/test/annexB/built-ins/String/prototype/fontcolor/B.2.3.7.js @@ -5,13 +5,13 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.fontcolor returns a string of HTML describing a single - HTML font element. The element's content is the `this` value of the - function invocation, coerced to a string. If specified, the first argument - will be coerced to a string, escaped, and set as the element's `color` - attribute. - es6id: B.2.3.7 +description: > + String.prototype.fontcolor returns a string of HTML describing a single + HTML font element. The element's content is the `this` value of the + function invocation, coerced to a string. If specified, the first argument + will be coerced to a string, escaped, and set as the element's `color` + attribute. +es6id: B.2.3.7 ---*/ assert.sameValue('_'.fontcolor('b'), '_'); diff --git a/test/annexB/built-ins/String/prototype/fontsize/B.2.3.8.js b/test/annexB/built-ins/String/prototype/fontsize/B.2.3.8.js index cf1199b2193..109074c7559 100644 --- a/test/annexB/built-ins/String/prototype/fontsize/B.2.3.8.js +++ b/test/annexB/built-ins/String/prototype/fontsize/B.2.3.8.js @@ -5,13 +5,13 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.fontsize returns a string of HTML describing a single - HTML font element. The element's content is the `this` value of the - function invocation, coerced to a string. If specified, the first argument - will be coerced to a string, escaped, and set as the element's `size` - attribute. - es6id: B.2.3.8 +description: > + String.prototype.fontsize returns a string of HTML describing a single + HTML font element. The element's content is the `this` value of the + function invocation, coerced to a string. If specified, the first argument + will be coerced to a string, escaped, and set as the element's `size` + attribute. +es6id: B.2.3.8 ---*/ assert.sameValue('_'.fontsize('b'), '_'); diff --git a/test/annexB/built-ins/String/prototype/italics/B.2.3.9.js b/test/annexB/built-ins/String/prototype/italics/B.2.3.9.js index 1f71f9a1b3a..6c1956182a1 100644 --- a/test/annexB/built-ins/String/prototype/italics/B.2.3.9.js +++ b/test/annexB/built-ins/String/prototype/italics/B.2.3.9.js @@ -5,11 +5,11 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.italics returns a string of HTML describing a single HTML - italic element. The element's content is the `this` value of the function - invocation, coerced to a string. - es6id: B.2.3.9 +description: > + String.prototype.italics returns a string of HTML describing a single HTML + italic element. The element's content is the `this` value of the function + invocation, coerced to a string. +es6id: B.2.3.9 ---*/ assert.sameValue('_'.italics(), '_'); diff --git a/test/annexB/built-ins/String/prototype/link/B.2.3.10.js b/test/annexB/built-ins/String/prototype/link/B.2.3.10.js index 8e5df2b86fa..c53b82425fd 100644 --- a/test/annexB/built-ins/String/prototype/link/B.2.3.10.js +++ b/test/annexB/built-ins/String/prototype/link/B.2.3.10.js @@ -5,12 +5,12 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.link returns a string of HTML describing a single HTML - link element. The element's content is the `this` value of the function - invocation, coerced to a string. If specified, the first argument will be - coerced to a string, escaped, and set as the element's `href` attribute. - es6id: B.2.3.10 +description: > + String.prototype.link returns a string of HTML describing a single HTML + link element. The element's content is the `this` value of the function + invocation, coerced to a string. If specified, the first argument will be + coerced to a string, escaped, and set as the element's `href` attribute. +es6id: B.2.3.10 ---*/ assert.sameValue('_'.link('b'), '_'); diff --git a/test/annexB/built-ins/String/prototype/small/B.2.3.11.js b/test/annexB/built-ins/String/prototype/small/B.2.3.11.js index 2db79ee87db..e894b278af9 100644 --- a/test/annexB/built-ins/String/prototype/small/B.2.3.11.js +++ b/test/annexB/built-ins/String/prototype/small/B.2.3.11.js @@ -5,11 +5,11 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.small returns a string of HTML describing a single HTML - small print element. The element's content is the `this` value of the - function invocation, coerced to a string. - es6id: B.2.3.11 +description: > + String.prototype.small returns a string of HTML describing a single HTML + small print element. The element's content is the `this` value of the + function invocation, coerced to a string. +es6id: B.2.3.11 ---*/ assert.sameValue('_'.small(), '_'); diff --git a/test/annexB/built-ins/String/prototype/strike/B.2.3.12.js b/test/annexB/built-ins/String/prototype/strike/B.2.3.12.js index 366b4ae0c9a..4488457ba8d 100644 --- a/test/annexB/built-ins/String/prototype/strike/B.2.3.12.js +++ b/test/annexB/built-ins/String/prototype/strike/B.2.3.12.js @@ -5,11 +5,11 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.strike returns a string of HTML describing a single HTML - strikethrough element. The element's content is the `this` value of the - function invocation, coerced to a string. - es6id: B.2.3.12 +description: > + String.prototype.strike returns a string of HTML describing a single HTML + strikethrough element. The element's content is the `this` value of the + function invocation, coerced to a string. +es6id: B.2.3.12 ---*/ assert.sameValue('_'.strike(), '_'); diff --git a/test/annexB/built-ins/String/prototype/sub/B.2.3.13.js b/test/annexB/built-ins/String/prototype/sub/B.2.3.13.js index a7bf68dbefe..f7b39ce6b54 100644 --- a/test/annexB/built-ins/String/prototype/sub/B.2.3.13.js +++ b/test/annexB/built-ins/String/prototype/sub/B.2.3.13.js @@ -5,11 +5,11 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.sub returns a string of HTML describing a single HTML - subscript element. The element's content is the `this` value of the - function invocation, coerced to a string. - es6id: B.2.3.13 +description: > + String.prototype.sub returns a string of HTML describing a single HTML + subscript element. The element's content is the `this` value of the + function invocation, coerced to a string. +es6id: B.2.3.13 ---*/ assert.sameValue('_'.sub(), '_'); diff --git a/test/annexB/built-ins/String/prototype/sup/B.2.3.14.js b/test/annexB/built-ins/String/prototype/sup/B.2.3.14.js index fff0fb4ba40..0f14ff8972e 100644 --- a/test/annexB/built-ins/String/prototype/sup/B.2.3.14.js +++ b/test/annexB/built-ins/String/prototype/sup/B.2.3.14.js @@ -5,11 +5,11 @@ // http://mathias.html5.org/tests/javascript/string/ /*--- - description: > - String.prototype.sup returns a string of HTML describing a single HTML - superscript element. The element's content is the `this` value of the - function invocation, coerced to a string. - es6id: B.2.3.14 +description: > + String.prototype.sup returns a string of HTML describing a single HTML + superscript element. The element's content is the `this` value of the + function invocation, coerced to a string. +es6id: B.2.3.14 ---*/ assert.sameValue('_'.sup(), '_'); diff --git a/test/language/expressions/object/method-definition/generator-no-yield.js b/test/language/expressions/object/method-definition/generator-no-yield.js index 26c694eea08..587b780ca85 100644 --- a/test/language/expressions/object/method-definition/generator-no-yield.js +++ b/test/language/expressions/object/method-definition/generator-no-yield.js @@ -2,11 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - Generators declared with GeneratorMethod syntax do not require a - `yield` expression. - features: [generators] - es6id: 14.4 +description: > + Generators declared with GeneratorMethod syntax do not require a + `yield` expression. +features: [generators] +es6id: 14.4 ---*/ var result; diff --git a/test/language/expressions/object/method-definition/generator-return.js b/test/language/expressions/object/method-definition/generator-return.js index 1d2b8c76871..4999b65e8fd 100644 --- a/test/language/expressions/object/method-definition/generator-return.js +++ b/test/language/expressions/object/method-definition/generator-return.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `return` is a valid statement within generator function bodies. - features: [generators] - es6id: 14.4 +description: > + `return` is a valid statement within generator function bodies. +features: [generators] +es6id: 14.4 ---*/ var result; diff --git a/test/language/expressions/object/method-definition/yield-as-expression-with-rhs.js b/test/language/expressions/object/method-definition/yield-as-expression-with-rhs.js index 263e2b2162a..0faaa22277d 100644 --- a/test/language/expressions/object/method-definition/yield-as-expression-with-rhs.js +++ b/test/language/expressions/object/method-definition/yield-as-expression-with-rhs.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is a valid expression within generator function bodies. - features: [generators] - es6id: 14.4 +description: > + `yield` is a valid expression within generator function bodies. +features: [generators] +es6id: 14.4 ---*/ var iter, result; diff --git a/test/language/expressions/object/method-definition/yield-as-expression-without-rhs.js b/test/language/expressions/object/method-definition/yield-as-expression-without-rhs.js index dc8334ac6ad..be16e011246 100644 --- a/test/language/expressions/object/method-definition/yield-as-expression-without-rhs.js +++ b/test/language/expressions/object/method-definition/yield-as-expression-without-rhs.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is a valid expression within generator function bodies. - features: [generators] - es6id: 14.4 +description: > + `yield` is a valid expression within generator function bodies. +features: [generators] +es6id: 14.4 ---*/ var iter, result; diff --git a/test/language/expressions/object/method-definition/yield-as-function-expression-binding-identifier.js b/test/language/expressions/object/method-definition/yield-as-function-expression-binding-identifier.js index 7e548a8e3c4..d192ed5beb3 100644 --- a/test/language/expressions/object/method-definition/yield-as-function-expression-binding-identifier.js +++ b/test/language/expressions/object/method-definition/yield-as-function-expression-binding-identifier.js @@ -2,12 +2,12 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` may be used as the binding identifier of a function expression - within generator bodies. - features: [generators] - es6id: 14.1 - flags: [noStrict] +description: > + `yield` may be used as the binding identifier of a function expression + within generator bodies. +features: [generators] +es6id: 14.1 +flags: [noStrict] ---*/ var result; diff --git a/test/language/expressions/object/method-definition/yield-as-generator-method-binding-identifier.js b/test/language/expressions/object/method-definition/yield-as-generator-method-binding-identifier.js index 03fd4ee6b07..e887000e83b 100644 --- a/test/language/expressions/object/method-definition/yield-as-generator-method-binding-identifier.js +++ b/test/language/expressions/object/method-definition/yield-as-generator-method-binding-identifier.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is a valid BindingIdentifier for GeneratorMethods - features: [generators] - es6id: 12.1.1 +description: > + `yield` is a valid BindingIdentifier for GeneratorMethods +features: [generators] +es6id: 12.1.1 ---*/ var iter, result; diff --git a/test/language/expressions/object/method-definition/yield-as-identifier-in-nested-function.js b/test/language/expressions/object/method-definition/yield-as-identifier-in-nested-function.js index 843f097a730..9482f10d766 100644 --- a/test/language/expressions/object/method-definition/yield-as-identifier-in-nested-function.js +++ b/test/language/expressions/object/method-definition/yield-as-identifier-in-nested-function.js @@ -2,12 +2,12 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is not a reserved keyword within normal function bodies declared - within generator function bodies. - features: [generators] - es6id: 12.1.1 - flags: [noStrict] +description: > + `yield` is not a reserved keyword within normal function bodies declared + within generator function bodies. +features: [generators] +es6id: 12.1.1 +flags: [noStrict] ---*/ var result; diff --git a/test/language/expressions/object/method-definition/yield-as-literal-property-name.js b/test/language/expressions/object/method-definition/yield-as-literal-property-name.js index 6f287df44a7..02915e005f0 100644 --- a/test/language/expressions/object/method-definition/yield-as-literal-property-name.js +++ b/test/language/expressions/object/method-definition/yield-as-literal-property-name.js @@ -2,11 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` may be used as a literal property name in an object literal - within generator function bodies. - features: [generators] - es6id: 12.1.1 +description: > + `yield` may be used as a literal property name in an object literal + within generator function bodies. +features: [generators] +es6id: 12.1.1 ---*/ var result; diff --git a/test/language/expressions/object/method-definition/yield-as-logical-or-expression.js b/test/language/expressions/object/method-definition/yield-as-logical-or-expression.js index 1ed0f73b400..8c2ceace0e0 100644 --- a/test/language/expressions/object/method-definition/yield-as-logical-or-expression.js +++ b/test/language/expressions/object/method-definition/yield-as-logical-or-expression.js @@ -2,13 +2,13 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` expressions are not LogicalOrExpressions. - features: [generators] - es6id: 12.1.1 - negative: - phase: parse - type: SyntaxError +description: > + `yield` expressions are not LogicalOrExpressions. +features: [generators] +es6id: 12.1.1 +negative: + phase: parse + type: SyntaxError ---*/ $DONOTEVALUATE(); diff --git a/test/language/expressions/object/method-definition/yield-as-parameter.js b/test/language/expressions/object/method-definition/yield-as-parameter.js index c0da01d3687..00245ffb99d 100644 --- a/test/language/expressions/object/method-definition/yield-as-parameter.js +++ b/test/language/expressions/object/method-definition/yield-as-parameter.js @@ -2,14 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is a reserved keyword within generator function bodies and may - not be used as the binding identifier of a parameter. - features: [generators] - es6id: 12.1.1 - negative: - phase: parse - type: SyntaxError +description: > + `yield` is a reserved keyword within generator function bodies and may + not be used as the binding identifier of a parameter. +features: [generators] +es6id: 12.1.1 +negative: + phase: parse + type: SyntaxError ---*/ $DONOTEVALUATE(); diff --git a/test/language/expressions/object/method-definition/yield-as-property-name.js b/test/language/expressions/object/method-definition/yield-as-property-name.js index 5f368aa8c2a..7da91fb0a8b 100644 --- a/test/language/expressions/object/method-definition/yield-as-property-name.js +++ b/test/language/expressions/object/method-definition/yield-as-property-name.js @@ -2,11 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` may be used as a literal property name in an object literal - within generator function bodies. - features: [generators] - es6id: 12.1.1 +description: > + `yield` may be used as a literal property name in an object literal + within generator function bodies. +features: [generators] +es6id: 12.1.1 ---*/ var result; diff --git a/test/language/expressions/object/method-definition/yield-as-statement.js b/test/language/expressions/object/method-definition/yield-as-statement.js index 98cd17a727a..aaff6f46c55 100644 --- a/test/language/expressions/object/method-definition/yield-as-statement.js +++ b/test/language/expressions/object/method-definition/yield-as-statement.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is a valid statement within generator function bodies. - features: [generators] - es6id: 14.4 +description: > + `yield` is a valid statement within generator function bodies. +features: [generators] +es6id: 14.4 ---*/ var iter, result; diff --git a/test/language/expressions/object/method-definition/yield-as-yield-operand.js b/test/language/expressions/object/method-definition/yield-as-yield-operand.js index 2906479fa56..b67c6d844fa 100644 --- a/test/language/expressions/object/method-definition/yield-as-yield-operand.js +++ b/test/language/expressions/object/method-definition/yield-as-yield-operand.js @@ -2,11 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` expressions may be used as the right-hand-side of other `yield` - expressions. - features: [generators] - es6id: 14.4 +description: > + `yield` expressions may be used as the right-hand-side of other `yield` + expressions. +features: [generators] +es6id: 14.4 ---*/ var iter, result; diff --git a/test/language/expressions/object/method-definition/yield-newline.js b/test/language/expressions/object/method-definition/yield-newline.js index d5705fd4759..d5e4ce02765 100644 --- a/test/language/expressions/object/method-definition/yield-newline.js +++ b/test/language/expressions/object/method-definition/yield-newline.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - Newlines terminate `yield` expressions. - features: [generators] - es6id: 14.4 +description: > + Newlines terminate `yield` expressions. +features: [generators] +es6id: 14.4 ---*/ var iter, result; diff --git a/test/language/expressions/object/method-definition/yield-star-after-newline.js b/test/language/expressions/object/method-definition/yield-star-after-newline.js index 8d68abeceb1..fac9efb1e24 100644 --- a/test/language/expressions/object/method-definition/yield-star-after-newline.js +++ b/test/language/expressions/object/method-definition/yield-star-after-newline.js @@ -2,13 +2,13 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - A newline may not precede the `*` token in a `yield` expression. - features: [generators] - es6id: 14.4 - negative: - phase: parse - type: SyntaxError +description: > + A newline may not precede the `*` token in a `yield` expression. +features: [generators] +es6id: 14.4 +negative: + phase: parse + type: SyntaxError ---*/ $DONOTEVALUATE(); diff --git a/test/language/expressions/object/method-definition/yield-star-before-newline.js b/test/language/expressions/object/method-definition/yield-star-before-newline.js index 27b963b5f6f..d76431ea6b9 100644 --- a/test/language/expressions/object/method-definition/yield-star-before-newline.js +++ b/test/language/expressions/object/method-definition/yield-star-before-newline.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - The right-hand side of a `yield *` expression may appear on a new line. - features: [generators] - es6id: 14.4 +description: > + The right-hand side of a `yield *` expression may appear on a new line. +features: [generators] +es6id: 14.4 ---*/ var result; diff --git a/test/language/expressions/object/method-definition/yield-weak-binding.js b/test/language/expressions/object/method-definition/yield-weak-binding.js index 736f32d7eda..e95b1a73329 100644 --- a/test/language/expressions/object/method-definition/yield-weak-binding.js +++ b/test/language/expressions/object/method-definition/yield-weak-binding.js @@ -2,13 +2,13 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` expressions bind weakly - features: [generators] - es6id: 14.4 - negative: - phase: parse - type: SyntaxError +description: > + `yield` expressions bind weakly +features: [generators] +es6id: 14.4 +negative: + phase: parse + type: SyntaxError ---*/ $DONOTEVALUATE(); diff --git a/test/language/expressions/object/property-name-yield.js b/test/language/expressions/object/property-name-yield.js index 1788d6de9c2..c1fb2ec95d3 100644 --- a/test/language/expressions/object/property-name-yield.js +++ b/test/language/expressions/object/property-name-yield.js @@ -2,9 +2,9 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` may be used as a literal property name in an object literal. - es6id: 12.1.1 +description: > + `yield` may be used as a literal property name in an object literal. +es6id: 12.1.1 ---*/ ({ yield: 1 }); diff --git a/test/language/statements/class/definition/methods-gen-no-yield.js b/test/language/statements/class/definition/methods-gen-no-yield.js index 8ccc69af7e9..f34cc8aae79 100644 --- a/test/language/statements/class/definition/methods-gen-no-yield.js +++ b/test/language/statements/class/definition/methods-gen-no-yield.js @@ -2,11 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - Generators declared with GeneratorMethod syntax do not require a - `yield` expression. - features: [generators] - es6id: 14.4 +description: > + Generators declared with GeneratorMethod syntax do not require a + `yield` expression. +features: [generators] +es6id: 14.4 ---*/ var result; diff --git a/test/language/statements/class/definition/methods-gen-return.js b/test/language/statements/class/definition/methods-gen-return.js index f710b71f5c3..e0130747c22 100644 --- a/test/language/statements/class/definition/methods-gen-return.js +++ b/test/language/statements/class/definition/methods-gen-return.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `return` is a valid statement within generator function bodies. - features: [generators] - es6id: 14.4 +description: > + `return` is a valid statement within generator function bodies. +features: [generators] +es6id: 14.4 ---*/ var result; diff --git a/test/language/statements/class/definition/methods-gen-yield-as-expression-with-rhs.js b/test/language/statements/class/definition/methods-gen-yield-as-expression-with-rhs.js index ce21b185923..ac20f0622f2 100644 --- a/test/language/statements/class/definition/methods-gen-yield-as-expression-with-rhs.js +++ b/test/language/statements/class/definition/methods-gen-yield-as-expression-with-rhs.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is a valid expression within generator function bodies. - features: [generators] - es6id: 14.4 +description: > + `yield` is a valid expression within generator function bodies. +features: [generators] +es6id: 14.4 ---*/ var iter, result; diff --git a/test/language/statements/class/definition/methods-gen-yield-as-expression-without-rhs.js b/test/language/statements/class/definition/methods-gen-yield-as-expression-without-rhs.js index 1b9e706f2f8..7f6804e5998 100644 --- a/test/language/statements/class/definition/methods-gen-yield-as-expression-without-rhs.js +++ b/test/language/statements/class/definition/methods-gen-yield-as-expression-without-rhs.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is a valid expression within generator function bodies. - features: [generators] - es6id: 14.4 +description: > + `yield` is a valid expression within generator function bodies. +features: [generators] +es6id: 14.4 ---*/ var iter, result; diff --git a/test/language/statements/class/definition/methods-gen-yield-as-function-expression-binding-identifier.js b/test/language/statements/class/definition/methods-gen-yield-as-function-expression-binding-identifier.js index e8f4ed29b69..776c2e86ac3 100644 --- a/test/language/statements/class/definition/methods-gen-yield-as-function-expression-binding-identifier.js +++ b/test/language/statements/class/definition/methods-gen-yield-as-function-expression-binding-identifier.js @@ -2,14 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` may not be used as the binding identifier of a function - expression within classes. - features: [generators] - es6id: 14.1 - negative: - phase: parse - type: SyntaxError +description: > + `yield` may not be used as the binding identifier of a function + expression within classes. +features: [generators] +es6id: 14.1 +negative: + phase: parse + type: SyntaxError ---*/ $DONOTEVALUATE(); diff --git a/test/language/statements/class/definition/methods-gen-yield-as-generator-method-binding-identifier.js b/test/language/statements/class/definition/methods-gen-yield-as-generator-method-binding-identifier.js index 25bfe7e41ff..026a2296418 100644 --- a/test/language/statements/class/definition/methods-gen-yield-as-generator-method-binding-identifier.js +++ b/test/language/statements/class/definition/methods-gen-yield-as-generator-method-binding-identifier.js @@ -2,11 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is a valid BindingIdentifier for GeneratorMethods outside of - strict mode. - features: [generators] - es6id: 12.1.1 +description: > + `yield` is a valid BindingIdentifier for GeneratorMethods outside of + strict mode. +features: [generators] +es6id: 12.1.1 ---*/ var iter, result; diff --git a/test/language/statements/class/definition/methods-gen-yield-as-identifier-in-nested-function.js b/test/language/statements/class/definition/methods-gen-yield-as-identifier-in-nested-function.js index 18b6f0fac30..9eacc4aa5aa 100644 --- a/test/language/statements/class/definition/methods-gen-yield-as-identifier-in-nested-function.js +++ b/test/language/statements/class/definition/methods-gen-yield-as-identifier-in-nested-function.js @@ -2,14 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is a reserved keyword within normal function bodies declared - within classes. - features: [generators] - es6id: 12.1.1 - negative: - phase: parse - type: SyntaxError +description: > + `yield` is a reserved keyword within normal function bodies declared + within classes. +features: [generators] +es6id: 12.1.1 +negative: + phase: parse + type: SyntaxError ---*/ $DONOTEVALUATE(); diff --git a/test/language/statements/class/definition/methods-gen-yield-as-literal-property-name.js b/test/language/statements/class/definition/methods-gen-yield-as-literal-property-name.js index e3f312debf7..1252126548f 100644 --- a/test/language/statements/class/definition/methods-gen-yield-as-literal-property-name.js +++ b/test/language/statements/class/definition/methods-gen-yield-as-literal-property-name.js @@ -2,11 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` may be used as a literal property name in an object literal - within generator function bodies. - features: [generators] - es6id: 12.1.1 +description: > + `yield` may be used as a literal property name in an object literal + within generator function bodies. +features: [generators] +es6id: 12.1.1 ---*/ var result; diff --git a/test/language/statements/class/definition/methods-gen-yield-as-logical-or-expression.js b/test/language/statements/class/definition/methods-gen-yield-as-logical-or-expression.js index 7ca4acb55ae..378ad81d3f9 100644 --- a/test/language/statements/class/definition/methods-gen-yield-as-logical-or-expression.js +++ b/test/language/statements/class/definition/methods-gen-yield-as-logical-or-expression.js @@ -2,13 +2,13 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` expressions are not LogicalOrExpressions. - features: [generators] - es6id: 12.1.1 - negative: - phase: parse - type: SyntaxError +description: > + `yield` expressions are not LogicalOrExpressions. +features: [generators] +es6id: 12.1.1 +negative: + phase: parse + type: SyntaxError ---*/ $DONOTEVALUATE(); diff --git a/test/language/statements/class/definition/methods-gen-yield-as-parameter.js b/test/language/statements/class/definition/methods-gen-yield-as-parameter.js index 9aee02e0c24..17d49fb0f93 100644 --- a/test/language/statements/class/definition/methods-gen-yield-as-parameter.js +++ b/test/language/statements/class/definition/methods-gen-yield-as-parameter.js @@ -2,14 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is a reserved keyword within generator function bodies and may - not be used as the binding identifier of a parameter. - features: [generators] - es6id: 12.1.1 - negative: - phase: parse - type: SyntaxError +description: > + `yield` is a reserved keyword within generator function bodies and may + not be used as the binding identifier of a parameter. +features: [generators] +es6id: 12.1.1 +negative: + phase: parse + type: SyntaxError ---*/ $DONOTEVALUATE(); diff --git a/test/language/statements/class/definition/methods-gen-yield-as-property-name.js b/test/language/statements/class/definition/methods-gen-yield-as-property-name.js index 853c7645014..b5df5e9b9b1 100644 --- a/test/language/statements/class/definition/methods-gen-yield-as-property-name.js +++ b/test/language/statements/class/definition/methods-gen-yield-as-property-name.js @@ -2,11 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` may be used as a literal property name in an object literal - within generator function bodies. - features: [generators] - es6id: 12.1.1 +description: > + `yield` may be used as a literal property name in an object literal + within generator function bodies. +features: [generators] +es6id: 12.1.1 ---*/ var result; diff --git a/test/language/statements/class/definition/methods-gen-yield-as-statement.js b/test/language/statements/class/definition/methods-gen-yield-as-statement.js index a039e157e17..3030e44c3c5 100644 --- a/test/language/statements/class/definition/methods-gen-yield-as-statement.js +++ b/test/language/statements/class/definition/methods-gen-yield-as-statement.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is a valid statement within generator function bodies. - features: [generators] - es6id: 14.4 +description: > + `yield` is a valid statement within generator function bodies. +features: [generators] +es6id: 14.4 ---*/ var iter, result; diff --git a/test/language/statements/class/definition/methods-gen-yield-as-yield-operand.js b/test/language/statements/class/definition/methods-gen-yield-as-yield-operand.js index c75403bef9e..a259492e9ce 100644 --- a/test/language/statements/class/definition/methods-gen-yield-as-yield-operand.js +++ b/test/language/statements/class/definition/methods-gen-yield-as-yield-operand.js @@ -2,11 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` expressions may be used as the right-hand-side of other `yield` - expressions. - features: [generators] - es6id: 14.4 +description: > + `yield` expressions may be used as the right-hand-side of other `yield` + expressions. +features: [generators] +es6id: 14.4 ---*/ var iter, result; diff --git a/test/language/statements/class/definition/methods-gen-yield-newline.js b/test/language/statements/class/definition/methods-gen-yield-newline.js index faa90188cae..d12c8476d14 100644 --- a/test/language/statements/class/definition/methods-gen-yield-newline.js +++ b/test/language/statements/class/definition/methods-gen-yield-newline.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - Newlines terminate `yield` expressions. - features: [generators] - es6id: 14.4 +description: > + Newlines terminate `yield` expressions. +features: [generators] +es6id: 14.4 ---*/ var iter, result; diff --git a/test/language/statements/class/definition/methods-gen-yield-star-after-newline.js b/test/language/statements/class/definition/methods-gen-yield-star-after-newline.js index 2c756cc5927..083256c5f2d 100644 --- a/test/language/statements/class/definition/methods-gen-yield-star-after-newline.js +++ b/test/language/statements/class/definition/methods-gen-yield-star-after-newline.js @@ -2,13 +2,13 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - A newline may not precede the `*` token in a `yield` expression. - features: [generators] - es6id: 14.4 - negative: - phase: parse - type: SyntaxError +description: > + A newline may not precede the `*` token in a `yield` expression. +features: [generators] +es6id: 14.4 +negative: + phase: parse + type: SyntaxError ---*/ $DONOTEVALUATE(); diff --git a/test/language/statements/class/definition/methods-gen-yield-star-before-newline.js b/test/language/statements/class/definition/methods-gen-yield-star-before-newline.js index d02daec514c..e4da2e3f0b5 100644 --- a/test/language/statements/class/definition/methods-gen-yield-star-before-newline.js +++ b/test/language/statements/class/definition/methods-gen-yield-star-before-newline.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - The right-hand side of a `yield *` expression may appear on a new line. - features: [generators] - es6id: 14.4 +description: > + The right-hand side of a `yield *` expression may appear on a new line. +features: [generators] +es6id: 14.4 ---*/ var result; diff --git a/test/language/statements/class/definition/methods-gen-yield-weak-binding.js b/test/language/statements/class/definition/methods-gen-yield-weak-binding.js index cd1efec3867..02cc00ced00 100644 --- a/test/language/statements/class/definition/methods-gen-yield-weak-binding.js +++ b/test/language/statements/class/definition/methods-gen-yield-weak-binding.js @@ -2,13 +2,13 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` expressions bind weakly - features: [generators] - es6id: 14.4 - negative: - phase: parse - type: SyntaxError +description: > + `yield` expressions bind weakly +features: [generators] +es6id: 14.4 +negative: + phase: parse + type: SyntaxError ---*/ $DONOTEVALUATE(); diff --git a/test/language/statements/for-of/Array.prototype.entries.js b/test/language/statements/for-of/Array.prototype.entries.js index c75a3d20d65..3913b3baaf0 100644 --- a/test/language/statements/for-of/Array.prototype.entries.js +++ b/test/language/statements/for-of/Array.prototype.entries.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - The method should return a valid iterator that can be traversed using a - `for...of` loop. - es6id: 22.1.3.4 +description: > + The method should return a valid iterator that can be traversed using a + `for...of` loop. +es6id: 22.1.3.4 ---*/ var array = [0, 'a', true, false, null, /* hole */, undefined, NaN]; diff --git a/test/language/statements/for-of/Array.prototype.keys.js b/test/language/statements/for-of/Array.prototype.keys.js index 5a7dee0a93f..a57ceab5bb5 100644 --- a/test/language/statements/for-of/Array.prototype.keys.js +++ b/test/language/statements/for-of/Array.prototype.keys.js @@ -2,10 +2,10 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - The method should return a valid iterator that can be traversed using a - `for...of` loop. - es6id: 22.1.3.13 +description: > + The method should return a valid iterator that can be traversed using a + `for...of` loop. +es6id: 22.1.3.13 ---*/ var array = [0, 'a', true, false, null, /* hole */, undefined, NaN]; diff --git a/test/language/statements/for-of/array.js b/test/language/statements/for-of/array.js index 0a673c4bf18..fe3eb331353 100644 --- a/test/language/statements/for-of/array.js +++ b/test/language/statements/for-of/array.js @@ -2,9 +2,9 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - Array instances should be able to be traversed using a `for...of` loop. - es6id: 13.6.4 +description: > + Array instances should be able to be traversed using a `for...of` loop. +es6id: 13.6.4 ---*/ var array = [0, 'a', true, false, null, /* hole */, undefined, NaN]; diff --git a/test/language/statements/labeled/value-yield-non-strict.js b/test/language/statements/labeled/value-yield-non-strict.js index 4698efcebd7..9adbcc09a50 100644 --- a/test/language/statements/labeled/value-yield-non-strict.js +++ b/test/language/statements/labeled/value-yield-non-strict.js @@ -2,11 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is not a reserved identifier in non-strict mode code and may be - used as a label. - es6id: 12.1.1 - flags: [noStrict] +description: > + `yield` is not a reserved identifier in non-strict mode code and may be + used as a label. +es6id: 12.1.1 +flags: [noStrict] ---*/ yield: 1; diff --git a/test/language/statements/labeled/value-yield-strict.js b/test/language/statements/labeled/value-yield-strict.js index acbe292611c..310630e9771 100644 --- a/test/language/statements/labeled/value-yield-strict.js +++ b/test/language/statements/labeled/value-yield-strict.js @@ -2,14 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- - description: > - `yield` is a reserved identifier in strict mode code and may not be used - as a label. - es6id: 12.1.1 - negative: - phase: parse - type: SyntaxError - flags: [onlyStrict] +description: > + `yield` is a reserved identifier in strict mode code and may not be used + as a label. +es6id: 12.1.1 +negative: + phase: parse + type: SyntaxError +flags: [onlyStrict] ---*/ $DONOTEVALUATE(); diff --git a/tools/lint/lib/checks/parsetestrecord.py b/tools/lint/lib/checks/parsetestrecord.py new file mode 100644 index 00000000000..d79f324bd08 --- /dev/null +++ b/tools/lint/lib/checks/parsetestrecord.py @@ -0,0 +1,92 @@ +import os +import sys +from ..check import Check + + +def load_module_2(dirname, module_name): + import imp + + f = None + try: + (f, pathname, description) = imp.find_module(module_name, [dirname]) + module = imp.load_module(module_name, f, pathname, description) + return module + except: + raise ImportError("Can't load " + module_name) + finally: + if f: + f.close() + + +def load_module_3(dirname, module_name): + import importlib.machinery + import importlib.util + + # Create a FileFinder to load Python source files. + loader_details = ( + importlib.machinery.SourceFileLoader, + importlib.machinery.SOURCE_SUFFIXES, + ) + finder = importlib.machinery.FileFinder(dirname, loader_details) + + # Find the module spec. + spec = finder.find_spec(module_name) + if spec is None: + raise RuntimeError("Can't load " + module_name) + + # Create and execute the module. + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + + # Return the executed module + return module + + +def load_parse_test_record(): + checks_dir = os.path.dirname(os.path.realpath(__file__)) + packing_dir = os.path.join(checks_dir, "../../../packaging") + module_name = "parseTestRecord" + + # The "imp" module is deprecated in Python 3.4 and will be removed in + # Python 3.12. Use it only if the current Python version is too old to use + # the "importlib" module. + if sys.version_info < (3, 4): + return load_module_2(packing_dir, module_name) + + return load_module_3(packing_dir, module_name) + + +parse_test_record = load_parse_test_record().parseTestRecord + + +class CheckParseTestRecord(Check): + '''Ensure tests can be parsed using parseTestRecord.py''' + ID = 'ParseTestRecord' + + def run(self, name, meta, source): + # Skip if not a test file. + if not meta: + return None + + errors = [] + test_rec = parse_test_record(source, name, lambda e: errors.append(e)) + + # Return if parse_test_record encountered errors. + if errors: + return "\n".join(errors) + + # Ensure all flags in `test_rec` are consistent with `meta`. + if "flags" in meta: + if "flags" not in test_rec: + return "Flags not present in parseTestRecord" + + if meta["flags"] != test_rec["flags"]: + return "Flags don't match parseTestRecord" + + for flag in meta["flags"]: + if flag not in test_rec: + return "Flag not present in parseTestRecord: " + flag + elif "flags" in test_rec: + return "Unexpected flags present in parseTestRecord" + + return None diff --git a/tools/lint/lib/frontmatter.py b/tools/lint/lib/frontmatter.py index 0f20dc62e20..2bfc9aea463 100644 --- a/tools/lint/lib/frontmatter.py +++ b/tools/lint/lib/frontmatter.py @@ -28,6 +28,7 @@ def parse(src): return None try: - return Result(yaml.load(match.group(1), MyLoader), MyLoader.events) + # NB: Call strip() to match parseTestRecord. + return Result(yaml.load(match.group(1).strip(), MyLoader), MyLoader.events) except (yaml.scanner.ScannerError, yaml.parser.ParserError): return None diff --git a/tools/lint/lint.py b/tools/lint/lint.py index b8eaa86e868..61ddf22d349 100755 --- a/tools/lint/lint.py +++ b/tools/lint/lint.py @@ -41,6 +41,7 @@ from lib.checks.nopadding import CheckNoPadding from lib.checks.flags import CheckFlags from lib.checks.posix import CheckPosix +from lib.checks.parsetestrecord import CheckParseTestRecord from lib.eprint import eprint import lib.frontmatter import lib.exceptions @@ -70,6 +71,7 @@ def checks(features): CheckNoPadding(), CheckFlags(), CheckPosix(), + CheckParseTestRecord(), ] def lint(file_names, features): diff --git a/tools/packaging/monkeyYaml.py b/tools/packaging/monkeyYaml.py index 7125899f63e..6b32c763c91 100644 --- a/tools/packaging/monkeyYaml.py +++ b/tools/packaging/monkeyYaml.py @@ -71,9 +71,12 @@ def myMultilineList(lines, value): leading = myLeadingSpaces(line) if myIsAllSpaces(line): pass - elif indent is not None and leading < indent: + elif indent is not None and ( + leading < indent or + (leading == indent and line[leading] != "-") + ): lines.insert(0, line) - break; + break else: indent = indent or leading value += [myReadOneLine(myRemoveListHeader(indent, line))] @@ -100,7 +103,10 @@ def myReadOneLine(value): def myFlowList(value): result = mYamlListPattern.match(value) - values = result.group(1).split(",") + values = result.group(1) + if values == "": + return [] + values = values.split(",") return [myReadOneLine(v.strip()) for v in values] def myMultiline(lines, value): @@ -113,7 +119,7 @@ def myMultiline(lines, value): value += ["\n"] elif myLeadingSpaces(line) < indent: lines.insert(0, line) - break; + break else: value += [line[(indent):]] value = " ".join(value) diff --git a/tools/packaging/parseTestRecord.py b/tools/packaging/parseTestRecord.py index 95b0205064a..28c5cd1ab7b 100644 --- a/tools/packaging/parseTestRecord.py +++ b/tools/packaging/parseTestRecord.py @@ -29,6 +29,12 @@ r'// See LICENSE or https://github\.com/tc39/test262/blob/HEAD/LICENSE' + r')[\r\n]{1,2}' + _BLANK_LINES, re.IGNORECASE) +_LICENSE_PATTERN_PUBLIC_DOMAIN = re.compile( + r'/\*[\r\n]{1,2}' + + r' \* Any copyright is dedicated to the Public Domain\.[\r\n]{1,2}' + + r' \* http://creativecommons\.org/licenses/publicdomain/[\r\n]{1,2}' + + r' \*/[\r\n]{1,2}' + _BLANK_LINES, re.IGNORECASE) + yamlLoad = None def yamlAttrParser(testRecord, attrs, name, onerror): @@ -51,10 +57,14 @@ def yamlAttrParser(testRecord, attrs, name, onerror): def findLicense(src): match = _LICENSE_PATTERN.search(src) - if not match: - return None + if match: + return match.group(0) + + match = _LICENSE_PATTERN_PUBLIC_DOMAIN.search(src) + if match: + return match.group(0) - return match.group(0) + return None def findAttrs(src): match = _YAML_PATTERN.search(src)