diff options
Diffstat (limited to 'js/src/tests/test262/language/white-space')
69 files changed, 1978 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/white-space/S7.2_A2.1_T2.js b/js/src/tests/test262/language/white-space/S7.2_A2.1_T2.js new file mode 100644 index 0000000000..14dbc46464 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A2.1_T2.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: HORIZONTAL TAB (U+0009) may occur within strings +es5id: 7.2_A2.1_T2 +description: Use real HORIZONTAL TAB +---*/ + +//CHECK#1 +if (" str ing " !== "\u0009str\u0009ing\u0009") { + throw new Test262Error('#1: " str ing " === "\\u0009str\\u0009ing\\u0009"'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A2.2_T2.js b/js/src/tests/test262/language/white-space/S7.2_A2.2_T2.js new file mode 100644 index 0000000000..deb3953ffd --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A2.2_T2.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: VERTICAL TAB (U+000B) may occur within strings +es5id: 7.2_A2.2_T2 +description: Use real VERTICAL TAB +---*/ + +//CHECK#1 +if ("string" !== "\u000Bstr\u000Bing\u000B") { + throw new Test262Error('#1: "string" === "\\u000Bstr\\u000Bing\\u000B"'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A2.3_T2.js b/js/src/tests/test262/language/white-space/S7.2_A2.3_T2.js new file mode 100644 index 0000000000..5cab692a70 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A2.3_T2.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: FORM FEED (U+000C) may occur within strings +es5id: 7.2_A2.3_T2 +description: Use real FORM FEED +---*/ + +//CHECK#1 +if ("string" !== "\u000Cstr\u000Cing\u000C") { + throw new Test262Error('#1: "string" === "\\u000Cstr\\u000Cing\\u000C"'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A2.4_T2.js b/js/src/tests/test262/language/white-space/S7.2_A2.4_T2.js new file mode 100644 index 0000000000..87fede43d0 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A2.4_T2.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: SPACE (U+0020) may occur within strings +es5id: 7.2_A2.4_T2 +description: Use real SPACE +---*/ + +//CHECK#1 +if (" str ing " !== "\u0020str\u0020ing\u0020") { + throw new Test262Error('#1: " str ing " === "\\u0020str\\u0020ing\\u0020"'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A2.5_T2.js b/js/src/tests/test262/language/white-space/S7.2_A2.5_T2.js new file mode 100644 index 0000000000..6b65a1bf75 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A2.5_T2.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: NO-BREAK SPACE (U+00A0) may occur within strings +es5id: 7.2_A2.5_T2 +description: Use real NO-BREAK SPACE +---*/ + +//CHECK#1 +if (" str ing " !== "\u00A0str\u00A0ing\u00A0") { + throw new Test262Error('#1: " str ing " === "\\u00A0str\\u00A0ing\\u00A0"'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A3.1_T2.js b/js/src/tests/test262/language/white-space/S7.2_A3.1_T2.js new file mode 100644 index 0000000000..6d3a3370b5 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A3.1_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Single line comment can contain HORIZONTAL TAB (U+0009) +es5id: 7.2_A3.1_T2 +description: Use real HORIZONTAL TAB +---*/ + +//CHECK#1 +var x = 0; +// single line comment x = 1; +if (x !== 0) { + throw new Test262Error('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A3.2_T2.js b/js/src/tests/test262/language/white-space/S7.2_A3.2_T2.js new file mode 100644 index 0000000000..2938d0c985 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A3.2_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Single line comment can contain VERTICAL TAB (U+000B) +es5id: 7.2_A3.2_T2 +description: Use real VERTICAL TAB +---*/ + +//CHECK#1 +var x = 0; +//singlelinecommentx = 1; +if (x !== 0) { + throw new Test262Error('#1: var x = 0; //singlelinecommentx = 1; x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A3.3_T2.js b/js/src/tests/test262/language/white-space/S7.2_A3.3_T2.js new file mode 100644 index 0000000000..9423adc6ae --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A3.3_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Single line comment can contain FORM FEED (U+000C) +es5id: 7.2_A3.3_T2 +description: Use real FORM FEED +---*/ + +//CHECK#1 +var x = 0; +//singlelinecommentx = 1; +if (x !== 0) { + throw new Test262Error('#1: var x = 0; //singlelinecommentx = 1; x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A3.4_T2.js b/js/src/tests/test262/language/white-space/S7.2_A3.4_T2.js new file mode 100644 index 0000000000..fde2b73f32 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A3.4_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Single line comment can contain SPACE (U+0020) +es5id: 7.2_A3.4_T2 +description: Use real SPACE +---*/ + +//CHECK#1 +var x = 0; +// single line comment x = 1; +if (x !== 0) { + throw new Test262Error('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A3.5_T2.js b/js/src/tests/test262/language/white-space/S7.2_A3.5_T2.js new file mode 100644 index 0000000000..7fdefb9e44 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A3.5_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Single line comment can contain NO-BREAK SPACE (U+00A0) +es5id: 7.2_A3.5_T2 +description: Use real NO-BREAK SPACE +---*/ + +//CHECK#1 +var x = 0; +// single line comment x = 1; +if (x !== 0) { + throw new Test262Error('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A4.1_T2.js b/js/src/tests/test262/language/white-space/S7.2_A4.1_T2.js new file mode 100644 index 0000000000..0f7c931181 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A4.1_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Multi line comment can contain HORIZONTAL TAB (U+0009) +es5id: 7.2_A4.1_T2 +description: Use real HORIZONTAL TAB +---*/ + +/*CHECK#1*/ +var x = 0; +/* multi line comment x = 1;*/ +if (x !== 0) { + throw new Test262Error('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A4.2_T2.js b/js/src/tests/test262/language/white-space/S7.2_A4.2_T2.js new file mode 100644 index 0000000000..d4b5102dbe --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A4.2_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Multi line comment can contain VERTICAL TAB (U+000B) +es5id: 7.2_A4.2_T2 +description: Use real VERTICAL TAB +---*/ + +/*CHECK#1*/ +var x = 0; +/*multilinecommentx = 1;*/ +if (x !== 0) { + throw new Test262Error('#1: var x = 0; /*multilinecommentx = 1;*/ x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A4.3_T2.js b/js/src/tests/test262/language/white-space/S7.2_A4.3_T2.js new file mode 100644 index 0000000000..3c1fcfa6b8 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A4.3_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Multi line comment can contain FORM FEED (U+000C) +es5id: 7.2_A4.3_T2 +description: Use real FORM FEED +---*/ + +/*CHECK#1*/ +var x = 0; +/*multilinecommentx = 1;*/ +if (x !== 0) { + throw new Test262Error('#1: var x = 0; /*multilinecommentx = 1;*/ x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A4.4_T2.js b/js/src/tests/test262/language/white-space/S7.2_A4.4_T2.js new file mode 100644 index 0000000000..2404a796dc --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A4.4_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Multi line comment can contain SPACE (U+0020) +es5id: 7.2_A4.4_T2 +description: Use real SPACE +---*/ + +/*CHECK#1*/ +var x = 0; +/* multi line comment x = 1;*/ +if (x !== 0) { + throw new Test262Error('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A4.5_T2.js b/js/src/tests/test262/language/white-space/S7.2_A4.5_T2.js new file mode 100644 index 0000000000..3c18f3f797 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A4.5_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Multi line comment can contain NO-BREAK SPACE (U+00A0) +es5id: 7.2_A4.5_T2 +description: Use real NO-BREAK SPACE +---*/ + +/*CHECK#1*/ +var x = 0; +/* multi line comment x = 1;*/ +if (x !== 0) { + throw new Test262Error('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/S7.2_A5_T1.js b/js/src/tests/test262/language/white-space/S7.2_A5_T1.js new file mode 100644 index 0000000000..d6cca63c25 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A5_T1.js @@ -0,0 +1,18 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + White space cannot be expressed as a Unicode escape sequence consisting + of six characters, namely \u plus four hexadecimal digits +es5id: 7.2_A5_T1 +description: Use TAB (U+0009) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +var\u0009x; diff --git a/js/src/tests/test262/language/white-space/S7.2_A5_T2.js b/js/src/tests/test262/language/white-space/S7.2_A5_T2.js new file mode 100644 index 0000000000..cdc5627d53 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A5_T2.js @@ -0,0 +1,18 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + White space cannot be expressed as a Unicode escape sequence consisting + of six characters, namely \u plus four hexadecimal digits +es5id: 7.2_A5_T2 +description: Use VERTICAL TAB (U+000B) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +var\u000Bx; diff --git a/js/src/tests/test262/language/white-space/S7.2_A5_T3.js b/js/src/tests/test262/language/white-space/S7.2_A5_T3.js new file mode 100644 index 0000000000..0fe8719d29 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A5_T3.js @@ -0,0 +1,18 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + White space cannot be expressed as a Unicode escape sequence consisting + of six characters, namely \u plus four hexadecimal digits +es5id: 7.2_A5_T3 +description: Use FORM FEED (U+000C) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +var\u000Cx; diff --git a/js/src/tests/test262/language/white-space/S7.2_A5_T4.js b/js/src/tests/test262/language/white-space/S7.2_A5_T4.js new file mode 100644 index 0000000000..c0a348c0da --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A5_T4.js @@ -0,0 +1,18 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + White space cannot be expressed as a Unicode escape sequence consisting + of six characters, namely \u plus four hexadecimal digits +es5id: 7.2_A5_T4 +description: Use SPACE (U+0020) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +var\u0020x; diff --git a/js/src/tests/test262/language/white-space/S7.2_A5_T5.js b/js/src/tests/test262/language/white-space/S7.2_A5_T5.js new file mode 100644 index 0000000000..a214996753 --- /dev/null +++ b/js/src/tests/test262/language/white-space/S7.2_A5_T5.js @@ -0,0 +1,18 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + White space cannot be expressed as a Unicode escape sequence consisting + of six characters, namely \u plus four hexadecimal digits +es5id: 7.2_A5_T5 +description: Use NO-BREAK SPACE (U+00A0) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +var\u00A0x; diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-carriage-return.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-carriage-return.js new file mode 100644 index 0000000000..532efbbdae --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-carriage-return.js @@ -0,0 +1,46 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/carriage-return.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+000D CARRIAGE RETURN <CR> (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + `U+000D` + </td> + <td> + CARRIAGE RETURN (CR) + </td> + <td> + <CR> + </td> + </tr> + + LineTerminator :: + <LF> + <CR> + <LS> + <PS> +---*/ + + +/x/g
; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-em-quad.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-em-quad.js new file mode 100644 index 0000000000..48ac2db76b --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-em-quad.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/em-quad.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+2001 EM QUAD (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-em-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-em-space.js new file mode 100644 index 0000000000..34333444d8 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-em-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/em-space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+2003 EM SPACE (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-en-quad.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-en-quad.js new file mode 100644 index 0000000000..1672a88253 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-en-quad.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/en-quad.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+2000 EN QUAD (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-en-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-en-space.js new file mode 100644 index 0000000000..30ffc599db --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-en-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/en-space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+2002 EN SPACE (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-figure-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-figure-space.js new file mode 100644 index 0000000000..8fb93fb253 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-figure-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/figure-space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+2007 FIGURE SPACE (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-form-feed.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-form-feed.js new file mode 100644 index 0000000000..372d4f85ad --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-form-feed.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/form-feed.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+000C FORM FEED <FF> (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + `U+000C` + </td> + <td> + FORM FEED (FF) + </td> + <td> + <FF> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-four-per-em-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-four-per-em-space.js new file mode 100644 index 0000000000..8856254d64 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-four-per-em-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/four-per-em-space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+2005 FOUR-PER-EM SPACE (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-hair-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-hair-space.js new file mode 100644 index 0000000000..cbe45699ec --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-hair-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/hair-space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+200A HAIR SPACE (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-ideographic-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-ideographic-space.js new file mode 100644 index 0000000000..9e63dbcd66 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-ideographic-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/ideographic-space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+3000 IDEOGRAPHIC SPACE (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-line-feed.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-line-feed.js new file mode 100644 index 0000000000..14b69a9006 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-line-feed.js @@ -0,0 +1,47 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/line-feed.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+000A LINE FEED <LF> (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + `U+000A` + </td> + <td> + LINE FEED (LF) + </td> + <td> + <LF> + </td> + </tr> + + LineTerminator :: + <LF> + <CR> + <LS> + <PS> +---*/ + + +/x/g +; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-line-separator.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-line-separator.js new file mode 100644 index 0000000000..0bfe3cefb0 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-line-separator.js @@ -0,0 +1,46 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/line-separator.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+2028 LINE SEPARATOR <LS> (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + `U+2028` + </td> + <td> + LINE SEPARATOR + </td> + <td> + <LS> + </td> + </tr> + + LineTerminator :: + <LF> + <CR> + <LS> + <PS> +---*/ + + +/x/g
; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-medium-mathematical-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-medium-mathematical-space.js new file mode 100644 index 0000000000..783dbaa638 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-medium-mathematical-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/medium-mathematical-space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+205F MEDIUM MATHEMATICAL SPACE (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-nbsp.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-nbsp.js new file mode 100644 index 0000000000..5a1a639e70 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-nbsp.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/nbsp.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+00A0 NO-BREAK SPACE <NBSP> (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + `U+00A0` + </td> + <td> + NO-BREAK SPACE + </td> + <td> + <NBSP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-nnbsp.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-nnbsp.js new file mode 100644 index 0000000000..02e93da379 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-nnbsp.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/nnbsp.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+202F NARROW NO-BREAK SPACE (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-ogham-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-ogham-space.js new file mode 100644 index 0000000000..04765afea6 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-ogham-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/ogham-space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+1680 OGHAM SPACE MARK (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-paragraph-separator.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-paragraph-separator.js new file mode 100644 index 0000000000..64990fa5e2 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-paragraph-separator.js @@ -0,0 +1,46 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/paragraph-separator.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+2029 PARAGRAPH SEPARATOR <PS> (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + `U+2029` + </td> + <td> + PARAGRAPH SEPARATOR + </td> + <td> + <PS> + </td> + </tr> + + LineTerminator :: + <LF> + <CR> + <LS> + <PS> +---*/ + + +/x/g
; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-punctuation-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-punctuation-space.js new file mode 100644 index 0000000000..1545c8d82d --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-punctuation-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/punctuation-space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+2008 PUNCTUATION SPACE (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-six-per-em-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-six-per-em-space.js new file mode 100644 index 0000000000..88795bb70c --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-six-per-em-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/six-per-em-space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+2006 SIX-PER-EM SPACE (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-space.js new file mode 100644 index 0000000000..33c42f77a1 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+0020 SPACE <SP> (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + `U+0020` + </td> + <td> + SPACE + </td> + <td> + <SP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-tab.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-tab.js new file mode 100644 index 0000000000..7392dafdf3 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-tab.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/tab.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+0009 CHARACTER TABULATION <TAB> (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + `U+0009` + </td> + <td> + CHARACTER TABULATION + </td> + <td> + <TAB> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-thin-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-thin-space.js new file mode 100644 index 0000000000..df26d3255c --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-thin-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/thin-space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+2009 THIN SPACE (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-three-per-em-space.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-three-per-em-space.js new file mode 100644 index 0000000000..34ede136d1 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-three-per-em-space.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/three-per-em-space.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+2004 THREE-PER-EM SPACE (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + Other category “Zs” + </td> + <td> + Any other Unicode “Space_Separator” code point + </td> + <td> + <USP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g ; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-vertical-tab.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-vertical-tab.js new file mode 100644 index 0000000000..a595f90aa5 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-vertical-tab.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/vertical-tab.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+000B LINE TABULATION <VT> (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + `U+000B` + </td> + <td> + LINE TABULATION + </td> + <td> + <VT> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/after-regular-expression-literal-zwnbsp.js b/js/src/tests/test262/language/white-space/after-regular-expression-literal-zwnbsp.js new file mode 100644 index 0000000000..2f400ef394 --- /dev/null +++ b/js/src/tests/test262/language/white-space/after-regular-expression-literal-zwnbsp.js @@ -0,0 +1,49 @@ +// This file was procedurally generated from the following sources: +// - src/insignificant-input-elements/zwnbsp.case +// - src/insignificant-input-elements/expression/after-regular-expression-literal.template +/*--- +description: U+FEFF ZERO WIDTH NO-BREAK SPACE <ZWNBSP> (after regular expression literal) +esid: sec-lexical-and-regexp-grammars +flags: [generated] +info: | + Input elements other than white space and comments form the terminal symbols + for the syntactic grammar for ECMAScript and are called ECMAScript + <em>tokens</em>. These tokens are the reserved words, identifiers, literals, + and punctuators of the ECMAScript language. Moreover, line terminators, + although not considered to be tokens, also become part of the stream of input + elements and guide the process of automatic semicolon insertion + (<emu-xref href="#sec-automatic-semicolon-insertion"></emu-xref>). Simple + white space and single-line comments are discarded and do not appear in the + stream of input elements for the syntactic grammar. A |MultiLineComment| (that + is, a comment of the form `/*`…`*``/` regardless of whether it spans more + than one line) is likewise simply discarded if it contains no line terminator; + but if a |MultiLineComment| contains one or more line terminators, then it is + replaced by a single line terminator, which becomes part of the stream of + input elements for the syntactic grammar. + + <tr> + <td> + `U+FEFF` + </td> + <td> + ZERO WIDTH NO-BREAK SPACE + </td> + <td> + <ZWNBSP> + </td> + </tr> + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> +---*/ + + +/x/g; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/between-form-feed.js b/js/src/tests/test262/language/white-space/between-form-feed.js new file mode 100644 index 0000000000..43ca67a986 --- /dev/null +++ b/js/src/tests/test262/language/white-space/between-form-feed.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: FORM FEED (U+000C) between any two tokens is allowed +es5id: 7.2_A1.3_T2 +description: Insert real FORM FEED between tokens of var x=1 +---*/ + +varx=1; + +assert.sameValue(x, 1); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/between-horizontal-tab.js b/js/src/tests/test262/language/white-space/between-horizontal-tab.js new file mode 100644 index 0000000000..f73cfbe3fb --- /dev/null +++ b/js/src/tests/test262/language/white-space/between-horizontal-tab.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: HORIZONTAL TAB (U+0009) between any two tokens is allowed +es5id: 7.2_A1.1_T2 +description: Insert real HORIZONTAL TAB between tokens of var x=1 +---*/ + + var x = 1 ; + +assert.sameValue(x, 1); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/between-nbsp.js b/js/src/tests/test262/language/white-space/between-nbsp.js new file mode 100644 index 0000000000..861ac5a5fc --- /dev/null +++ b/js/src/tests/test262/language/white-space/between-nbsp.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: NO-BREAK SPACE (U+00A0) between any two tokens is allowed +es5id: 7.2_A1.5_T2 +description: Insert real NO-BREAK SPACE between tokens of var x=1 +---*/ + + var x = 2 ; + +assert.sameValue(x, 2); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/between-space.js b/js/src/tests/test262/language/white-space/between-space.js new file mode 100644 index 0000000000..25adf422e3 --- /dev/null +++ b/js/src/tests/test262/language/white-space/between-space.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: SPACE (U+0020) between any two tokens is allowed +es5id: 7.2_A1.4_T2 +description: Insert real SPACE between tokens of var x=1 +---*/ + + var x = 2 ; + +assert.sameValue(x, 2); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/between-vertical-tab.js b/js/src/tests/test262/language/white-space/between-vertical-tab.js new file mode 100644 index 0000000000..5591eb62c4 --- /dev/null +++ b/js/src/tests/test262/language/white-space/between-vertical-tab.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: VERTICAL TAB (U+000B) between any two tokens is allowed +es5id: 7.2_A1.2_T2 +description: Insert real VERTICAL TAB between tokens of var x=1 +---*/ + +varx=1; + +assert.sameValue(x, 1); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/browser.js b/js/src/tests/test262/language/white-space/browser.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/language/white-space/browser.js diff --git a/js/src/tests/test262/language/white-space/comment-multi-form-feed.js b/js/src/tests/test262/language/white-space/comment-multi-form-feed.js new file mode 100644 index 0000000000..52738c33fc --- /dev/null +++ b/js/src/tests/test262/language/white-space/comment-multi-form-feed.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Multi line comment can contain FORM FEED (U+000C) +es5id: 7.2_A4.3_T1 +description: Use FORM FEED(\u000C) +---*/ + +// CHECK#1 +eval("/*\u000C multi line \u000C comment \u000C*/"); + +//CHECK#2 +var x = 0; +eval("/*\u000C multi line \u000C comment \u000C x = 1;*/"); +if (x !== 0) { + throw new Test262Error('#1: var x = 0; eval("/*\\u000C multi line \\u000C comment \\u000C x = 1;*/"); x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/comment-multi-horizontal-tab.js b/js/src/tests/test262/language/white-space/comment-multi-horizontal-tab.js new file mode 100644 index 0000000000..d10e454310 --- /dev/null +++ b/js/src/tests/test262/language/white-space/comment-multi-horizontal-tab.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Multi line comment can contain HORIZONTAL TAB (U+0009) +es5id: 7.2_A4.1_T1 +description: Use HORIZONTAL TAB(\u0009) +---*/ + +// CHECK#1 +eval("/*\u0009 multi line \u0009 comment \u0009*/"); + +//CHECK#2 +var x = 0; +eval("/*\u0009 multi line \u0009 comment \u0009 x = 1;*/"); +if (x !== 0) { + throw new Test262Error('#1: var x = 0; eval("/*\\u0009 multi line \\u0009 comment \\u0009 x = 1;*/"); x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/comment-multi-nbsp.js b/js/src/tests/test262/language/white-space/comment-multi-nbsp.js new file mode 100644 index 0000000000..facc4e45ae --- /dev/null +++ b/js/src/tests/test262/language/white-space/comment-multi-nbsp.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Multi line comment can contain NO-BREAK SPACE (U+00A0) +es5id: 7.2_A4.5_T1 +description: Use NO-BREAK SPACE(\u00A0) +---*/ + +// CHECK#1 +eval("/*\u00A0 multi line \u00A0 comment \u00A0*/"); + +//CHECK#2 +var x = 0; +eval("/*\u00A0 multi line \u00A0 comment \u00A0 x = 1;*/"); +if (x !== 0) { + throw new Test262Error('#1: var x = 0; eval("/*\\u00A0 multi line \\u00A0 comment \\u00A0 x = 1;*/"); x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/comment-multi-space.js b/js/src/tests/test262/language/white-space/comment-multi-space.js new file mode 100644 index 0000000000..b35fcaa80f --- /dev/null +++ b/js/src/tests/test262/language/white-space/comment-multi-space.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Multi line comment can contain SPACE (U+0020) +es5id: 7.2_A4.4_T1 +description: Use SPACE(\u0020) +---*/ + +// CHECK#1 +eval("/*\u0020 multi line \u0020 comment \u0020*/"); + +//CHECK#2 +var x = 0; +eval("/*\u0020 multi line \u0020 comment \u0020 x = 1;*/"); +if (x !== 0) { + throw new Test262Error('#1: var x = 0; eval("/*\\u0020 multi line \\u0020 comment \\u0020 x = 1;*/"); x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/comment-multi-vertical-tab.js b/js/src/tests/test262/language/white-space/comment-multi-vertical-tab.js new file mode 100644 index 0000000000..aa1054a502 --- /dev/null +++ b/js/src/tests/test262/language/white-space/comment-multi-vertical-tab.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Multi line comment can contain VERTICAL TAB (U+000B) +es5id: 7.2_A4.2_T1 +description: Use VERTICAL TAB(\u000B) +---*/ + +// CHECK#1 +eval("/*\u000B multi line \u000B comment \u000B*/"); + +//CHECK#2 +var x = 0; +eval("/*\u000B multi line \u000B comment \u000B x = 1;*/"); +if (x !== 0) { + throw new Test262Error('#1: var x = 0; eval("/*\\u000B multi line \\u000B comment \\u000B x = 1;*/"); x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/comment-single-form-feed.js b/js/src/tests/test262/language/white-space/comment-single-form-feed.js new file mode 100644 index 0000000000..3286763143 --- /dev/null +++ b/js/src/tests/test262/language/white-space/comment-single-form-feed.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Single line comment can contain FORM FEED (U+000C) +es5id: 7.2_A3.3_T1 +description: Use FORM FEED(\u000C) +---*/ + +// CHECK#1 +eval("//\u000C single line \u000C comment \u000C"); + +//CHECK#2 +var x = 0; +eval("//\u000C single line \u000C comment \u000C x = 1;"); +if (x !== 0) { + throw new Test262Error('#1: var x = 0; eval("//\\u000C single line \\u000C comment \\u000C x = 1;"); x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/comment-single-horizontal-tab.js b/js/src/tests/test262/language/white-space/comment-single-horizontal-tab.js new file mode 100644 index 0000000000..0c47e2165d --- /dev/null +++ b/js/src/tests/test262/language/white-space/comment-single-horizontal-tab.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Single line comment can contain HORIZONTAL TAB (U+0009) +es5id: 7.2_A3.1_T1 +description: Use HORIZONTAL TAB(\u0009) +---*/ + +// CHECK#1 +eval("//\u0009 single line \u0009 comment \u0009"); + +//CHECK#2 +var x = 0; +eval("//\u0009 single line \u0009 comment \u0009 x = 1;"); +if (x !== 0) { + throw new Test262Error('#1: var x = 0; eval("//\\u0009 single line \\u0009 comment \\u0009 x = 1;"); x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/comment-single-nbsp.js b/js/src/tests/test262/language/white-space/comment-single-nbsp.js new file mode 100644 index 0000000000..104dfd4cf6 --- /dev/null +++ b/js/src/tests/test262/language/white-space/comment-single-nbsp.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Single line comment can contain NO-BREAK SPACE (U+00A0) +es5id: 7.2_A3.5_T1 +description: Use NO-BREAK SPACE(\u00A0) +---*/ + +// CHECK#1 +eval("//\u00A0 single line \u00A0 comment \u00A0"); + +//CHECK#2 +var x = 0; +eval("//\u00A0 single line \u00A0 comment \u00A0 x = 1;"); +if (x !== 0) { + throw new Test262Error('#1: var x = 0; eval("//\\u00A0 single line \\u00A0 comment \\u00A0 x = 1;"); x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/comment-single-space.js b/js/src/tests/test262/language/white-space/comment-single-space.js new file mode 100644 index 0000000000..2386c6db7a --- /dev/null +++ b/js/src/tests/test262/language/white-space/comment-single-space.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Single line comment can contain SPACE (U+0020) +es5id: 7.2_A3.4_T1 +description: Use SPACE(\u0020) +---*/ + +// CHECK#1 +eval("//\u0020 single line \u0020 comment \u0020"); + +//CHECK#2 +var x = 0; +eval("//\u0020 single line \u0020 comment \u0020 x = 1;"); +if (x !== 0) { + throw new Test262Error('#1: var x = 0; eval("//\\u0020 single line \\u0020 comment \\u0020 x = 1;"); x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/comment-single-vertical-tab.js b/js/src/tests/test262/language/white-space/comment-single-vertical-tab.js new file mode 100644 index 0000000000..d9c2a519f9 --- /dev/null +++ b/js/src/tests/test262/language/white-space/comment-single-vertical-tab.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Single line comment can contain VERTICAL TAB (U+000B) +es5id: 7.2_A3.2_T1 +description: Use VERTICAL TAB(\u000B) +---*/ + +// CHECK#1 +eval("//\u000B single line \u000B comment \u000B"); + +//CHECK#2 +var x = 0; +eval("//\u000B single line \u000B comment \u000B x = 1;"); +if (x !== 0) { + throw new Test262Error('#1: var x = 0; eval("//\\u000B single line \\u000B comment \\u000B x = 1;"); x === 0. Actual: ' + (x)); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/mongolian-vowel-separator-eval.js b/js/src/tests/test262/language/white-space/mongolian-vowel-separator-eval.js new file mode 100644 index 0000000000..5d6914dbeb --- /dev/null +++ b/js/src/tests/test262/language/white-space/mongolian-vowel-separator-eval.js @@ -0,0 +1,31 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-white-space +description: > + Mongolian Vowel Separator is not recognized as white space (eval code). +info: | + 11.2 White Space + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> + <USP> :: + Other category “Zs” code points + + General Category of U+180E is “Cf” (Format). +features: [u180e] +---*/ + +// U+180E between "var" and "foo". +assert.throws(SyntaxError, function() { + eval("var\u180Efoo;"); +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/mongolian-vowel-separator.js b/js/src/tests/test262/language/white-space/mongolian-vowel-separator.js new file mode 100644 index 0000000000..6350dd38c6 --- /dev/null +++ b/js/src/tests/test262/language/white-space/mongolian-vowel-separator.js @@ -0,0 +1,33 @@ +// |reftest| error:SyntaxError +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-white-space +description: > + Mongolian Vowel Separator is not recognized as white space. +info: | + 11.2 White Space + + WhiteSpace :: + <TAB> + <VT> + <FF> + <SP> + <NBSP> + <ZWNBSP> + <USP> + <USP> :: + Other category “Zs” code points + + General Category of U+180E is “Cf” (Format). +negative: + phase: parse + type: SyntaxError +features: [u180e] +---*/ + +$DONOTEVALUATE(); + +// U+180E between "var" and "foo"; UTF8(0x180E) = 0xE1 0xA0 0x8E +varfoo; diff --git a/js/src/tests/test262/language/white-space/shell.js b/js/src/tests/test262/language/white-space/shell.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/language/white-space/shell.js diff --git a/js/src/tests/test262/language/white-space/string-form-feed.js b/js/src/tests/test262/language/white-space/string-form-feed.js new file mode 100644 index 0000000000..ffac2ddaa9 --- /dev/null +++ b/js/src/tests/test262/language/white-space/string-form-feed.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: FORM FEED (U+000C) may occur within strings +es5id: 7.2_A2.3_T1 +description: Use FORM FEED(\u000C and \f) +---*/ + +// CHECK#1 +if (eval("'\u000Cstr\u000Cing\u000C'") !== "\u000Cstr\u000Cing\u000C") { + throw new Test262Error('#1: eval("\'\\u000Cstr\\u000Cing\\u000C\'") === "\\u000Cstr\\u000Cing\\u000C"'); +} + +//CHECK#2 +if (eval("'\fstr\fing\f'") !== "\fstr\fing\f") { + throw new Test262Error('#2: eval("\'\\fstr\\fing\\f\'") === "\\fstr\\fing\\f"'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/string-horizontal-tab.js b/js/src/tests/test262/language/white-space/string-horizontal-tab.js new file mode 100644 index 0000000000..bcef5bff52 --- /dev/null +++ b/js/src/tests/test262/language/white-space/string-horizontal-tab.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: HORIZONTAL TAB (U+0009) may occur within strings +es5id: 7.2_A2.1_T1 +description: Use HORIZONTAL TAB(\u0009 and \t) +---*/ + +// CHECK#1 +if (eval("'\u0009str\u0009ing\u0009'") !== "\u0009str\u0009ing\u0009") { + throw new Test262Error('#1: eval("\'\\u0009str\\u0009ing\\u0009\'") === "\\u0009str\\u0009ing\\u0009"'); +} + +//CHECK#2 +if (eval("'\tstr\ting\t'") !== "\tstr\ting\t") { + throw new Test262Error('#2: eval("\'\\tstr\\ting\\t\'") === "\\tstr\\ting\\t"'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/string-nbsp.js b/js/src/tests/test262/language/white-space/string-nbsp.js new file mode 100644 index 0000000000..2b3d1d5c42 --- /dev/null +++ b/js/src/tests/test262/language/white-space/string-nbsp.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: NO-BREAK SPACE (U+00A0) may occur within strings +es5id: 7.2_A2.5_T1 +description: Use NO-BREAK SPACE(\u00A0) +---*/ + +// CHECK#1 +if (eval("'\u00A0str\u00A0ing\u00A0'") !== "\u00A0str\u00A0ing\u00A0") { + throw new Test262Error('#1: eval("\'\\u00A0str\\u00A0ing\\u00A0\'") === "\\u00A0str\\u00A0ing\\u00A0"'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/string-space.js b/js/src/tests/test262/language/white-space/string-space.js new file mode 100644 index 0000000000..40bb9ec1db --- /dev/null +++ b/js/src/tests/test262/language/white-space/string-space.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: SPACE (U+0020) may occur within strings +es5id: 7.2_A2.4_T1 +description: Use SPACE(\u0020) +---*/ + +// CHECK#1 +if (eval("'\u0020str\u0020ing\u0020'") !== "\u0020str\u0020ing\u0020") { + throw new Test262Error('#1: eval("\'\\u0020str\\u0020ing\\u0020\'") === "\\u0020str\\u0020ing\\u0020"'); +} + +//CHECK#2 +if (eval("' str ing '") !== " str ing ") { + throw new Test262Error('#2: eval("\' str ing \'") === " str ing "'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/white-space/string-vertical-tab.js b/js/src/tests/test262/language/white-space/string-vertical-tab.js new file mode 100644 index 0000000000..1b2ce7c999 --- /dev/null +++ b/js/src/tests/test262/language/white-space/string-vertical-tab.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: VERTICAL TAB (U+000B) may occur within strings +es5id: 7.2_A2.2_T1 +description: Use VERTICAL TAB(\u000B and \v) +---*/ + +// CHECK#1 +if (eval("'\u000Bstr\u000Bing\u000B'") !== "\u000Bstr\u000Bing\u000B") { + throw new Test262Error('#1: eval("\'\\u000Bstr\\u000Bing\\u000B\'") === "\\u000Bstr\\u000Bing\\u000B"'); +} + +//CHECK#2 +if (eval("'\vstr\ving\v'") !== "\vstr\ving\v") { + throw new Test262Error('#2: eval("\'\\vstr\\ving\\v\'") === "\\vstr\\ving\\v"'); +} + +reportCompare(0, 0); |