diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/src/tests/test262/ch07/7.3 | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/tests/test262/ch07/7.3')
61 files changed, 1396 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch07/7.3/7.3-1.js b/js/src/tests/test262/ch07/7.3/7.3-1.js new file mode 100644 index 000000000..3309e649a --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-1.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-1.js
+ * @description 7.3 - ES5 recognizes the character <LS> (\u2028) as line terminators when parsing statements
+ */
+
+
+function testcase() {
+ eval("var test7_3_1\u2028prop = 66;");
+ return (prop === 66) && ((typeof test7_3_1) === "undefined");
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-10.js b/js/src/tests/test262/ch07/7.3/7.3-10.js new file mode 100644 index 000000000..141841b9c --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-10.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-10.js
+ * @description 7.3 - ES5 recognizes the character <PS> (\u2029) as a NonEscapeCharacter
+ */
+
+
+function testcase() {
+ try {
+ eval("var prop = \\u2029;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-11.js b/js/src/tests/test262/ch07/7.3/7.3-11.js new file mode 100644 index 000000000..42116da20 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-11.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-11.js
+ * @description 7.3 - ES5 specifies that a multiline comment that contains a line terminator character <LS> (\u2028) must be treated as a single line terminator for the purposes of semicolon insertion
+ */
+
+
+function testcase() {
+ /*MultiLine
+ Comments
+ \u2028 var = ;
+ */
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-12.js b/js/src/tests/test262/ch07/7.3/7.3-12.js new file mode 100644 index 000000000..b993f5bde --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-12.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-12.js
+ * @description 7.3 - ES5 specifies that a multiline comment that contains a line terminator character <PS> (\u2029) must be treated as a single line terminator for the purposes of semicolon insertion
+ */
+
+
+function testcase() {
+ /*MultiLine
+ Comments
+ \u2029 var = ;
+ */
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-13.js b/js/src/tests/test262/ch07/7.3/7.3-13.js new file mode 100644 index 000000000..d7f941c38 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-13.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-13.js
+ * @description 7.3 - ES5 specifies that a multiline comment that contains a line terminator character <CR> (\u000D) must be treated as a single line terminator for the purposes of semicolon insertion
+ */
+
+
+function testcase() {
+ /*MultiLine
+ Comments
+ \u000D var = ;
+ */
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-14.js b/js/src/tests/test262/ch07/7.3/7.3-14.js new file mode 100644 index 000000000..8f973ae06 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-14.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-14.js
+ * @description 7.3 - ES5 specifies that a multiline comment that contains a line terminator character <LF> (\u000A) must be treated as a single line terminator for the purposes of semicolon insertion
+ */
+
+
+function testcase() {
+ /*MultiLine
+ Comments
+ \u000A var = ;
+ */
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-15.js b/js/src/tests/test262/ch07/7.3/7.3-15.js new file mode 100644 index 000000000..7dc88a644 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-15.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-15.js
+ * @description 7.3 - ES5 recognize <BOM> (\uFFFF) as a whitespace character
+ */
+
+
+function testcase() {
+ var prop = "a\uFFFFa";
+ return prop.length === 3 && prop !== "aa" && prop[1] === "\uFFFF";
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-2.js b/js/src/tests/test262/ch07/7.3/7.3-2.js new file mode 100644 index 000000000..95fb24280 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-2.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-2.js
+ * @description 7.3 - ES5 recognizes the character <PS> (\u2029) as line terminators when parsing statements
+ */
+
+
+function testcase() {
+ eval("var test7_3_2\u2029prop = 66;");
+ return (prop===66) && ((typeof test7_3_2) === "undefined");
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-3.js b/js/src/tests/test262/ch07/7.3/7.3-3.js new file mode 100644 index 000000000..5a05cd16e --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-3.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-3.js
+ * @description 7.3 - ES5 recognizes the character <LS> (\u2028) as terminating SingleLineComments
+ */
+
+
+function testcase() {
+ try {
+ eval("//Single Line Comments\u2028 var =;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-4.js b/js/src/tests/test262/ch07/7.3/7.3-4.js new file mode 100644 index 000000000..41285cb46 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-4.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-4.js
+ * @description 7.3 - ES5 recognizes the character <PS> (\u2029) as terminating SingleLineComments
+ */
+
+
+function testcase() {
+ try {
+ eval("//Single Line Comments\u2029 var =;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-5.js b/js/src/tests/test262/ch07/7.3/7.3-5.js new file mode 100644 index 000000000..ad65ebbf2 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-5.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-5.js
+ * @description 7.3 - ES5 recognizes the character <LS> (\u2028) as terminating string literal
+ */
+
+
+function testcase() {
+ var prop = "66\u2028123";
+ return prop === "66\u2028123" && prop[2] === "\u2028" && prop.length === 6;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-6.js b/js/src/tests/test262/ch07/7.3/7.3-6.js new file mode 100644 index 000000000..5035eae1c --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-6.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-6.js
+ * @description 7.3 - ES5 recognizes the character <PS> (\u2029) as terminating string literal
+ */
+
+
+function testcase() {
+ var prop = "66\u2029123";
+ return prop === "66\u2029123" && prop[2] === "\u2029" && prop.length === 6;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-7.js b/js/src/tests/test262/ch07/7.3/7.3-7.js new file mode 100644 index 000000000..641117ddf --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-7.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-7.js
+ * @description 7.3 - ES5 recognizes the character <LS> (\u2028) as terminating regular expression literals
+ */
+
+
+function testcase() {
+ try {
+ eval("var regExp = /[\u2028]/");
+ regExp.test("");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-8.js b/js/src/tests/test262/ch07/7.3/7.3-8.js new file mode 100644 index 000000000..7ac4481b1 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-8.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-8.js
+ * @description 7.3 - ES5 recognizes the character <PS> (\u2029) as terminating regular expression literals
+ */
+
+
+function testcase() {
+ try {
+ eval("var regExp = /[\u2029]/");
+ regExp.test("");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/7.3-9.js b/js/src/tests/test262/ch07/7.3/7.3-9.js new file mode 100644 index 000000000..53e964491 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/7.3-9.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch07/7.3/7.3-9.js
+ * @description 7.3 - ES5 recognizes the character <LS> (\u2028) as a NonEscapeCharacter
+ */
+
+
+function testcase() {
+ try {
+ eval("var prop = \\u2028;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A1.1_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A1.1_T1.js new file mode 100644 index 000000000..b5814c2e0 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A1.1_T1.js @@ -0,0 +1,40 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * LINE FEED (U+000A) may occur between any two tokens + * + * @path ch07/7.3/S7.3_A1.1_T1.js + * @description Insert LINE FEED (\u000A and \n) between tokens of var x=1 + */ + +// CHECK#1 +eval("\u000Avar\u000Ax\u000A=\u000A1\u000A"); +if (x !== 1) { + $ERROR('#1: eval("\\u000Avar\\u000Ax\\u000A=\\u000A1\\u000A"); x === 1. Actual: ' + (x)); +} + +//CHECK#2 +eval("\u000A" + "var" + "\u000A" + "x" + "\u000A" + "=" + "\u000A" + "1" + "\u000A"); +if (x !== 1) { + $ERROR('#2: eval("\\u000A" + "var" + "\\u000A" + "x" + "\\u000A" + "=" + "\\u000A" + "1" + "\\u000A"); x === 1. Actual: ' + (x)); +} + +//CHECK#3 +eval("\nvar\nx\n=\n1\n"); +if (x !== 1) { + $ERROR('#3: eval("\\nvar\\nx\\n=\\n1\\n"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +eval("\n" + "var" + "\n" + "x" + "\n" + "=" + "\n" + "1" + "\n"); +if (x !== 1) { + $ERROR('#4: eval("\\n" + "var" + "\\n" + "x" + "\\n" + "=" + "\\n" + "1" + "\\n"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +eval("\u000A" + "var" + "\n" + "x" + "\u000A" + "=" + "\n" + "1" + "\u000A"); +if (x !== 1) { + $ERROR('#5: eval("\\u000A" + "var" + "\\n" + "x" + "\\u000A" + "=" + "\\n" + "1" + "\\u000A"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A1.1_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A1.1_T2.js new file mode 100644 index 000000000..b4780361b --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A1.1_T2.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * LINE FEED (U+000A) may occur between any two tokens + * + * @path ch07/7.3/S7.3_A1.1_T2.js + * @description Insert real LINE FEED between tokens of var x=1 + */ + +//CHECK#1 +var +x += +1; +if (x !== 1) { + $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A1.2_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A1.2_T1.js new file mode 100644 index 000000000..bb11122f7 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A1.2_T1.js @@ -0,0 +1,40 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * CARRIAGE RETURN (U+000D) may occur between any two tokens + * + * @path ch07/7.3/S7.3_A1.2_T1.js + * @description Insert CARRIAGE RETURN (\u000D and \r) between tokens of var x=1 + */ + +// CHECK#1 +eval("\u000Dvar\u000Dx\u000D=\u000D1\u000D"); +if (x !== 1) { + $ERROR('#1: eval("\\u000Dvar\\u000Dx\\u000D=\\u000D1\\u000D"); x === 1. Actual: ' + (x)); +} + +//CHECK#2 +eval("\u000D" + "var" + "\u000D" + "x" + "\u000D" + "=" + "\u000D" + "1" + "\u000D"); +if (x !== 1) { + $ERROR('#2: eval("\\u000D" + "var" + "\\u000D" + "x" + "\\u000D" + "=" + "\\u000D" + "1" + "\\u000D"); x === 1. Actual: ' + (x)); +} + +//CHECK#3 +eval("\rvar\rx\r=\r1\r"); +if (x !== 1) { + $ERROR('#3: eval("\\rvar\\rx\\r=\\r1\\r"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +eval("\r" + "var" + "\r" + "x" + "\r" + "=" + "\r" + "1" + "\r"); +if (x !== 1) { + $ERROR('#4: eval("\\r" + "var" + "\\r" + "x" + "\\r" + "=" + "\\r" + "1" + "\\r"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +eval("\u000D" + "var" + "\r" + "x" + "\u000D" + "=" + "\r" + "1" + "\u000D"); +if (x !== 1) { + $ERROR('#5: eval("\\u000D" + "var" + "\\r" + "x" + "\\u000D" + "=" + "\\r" + "1" + "\\u000D"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A1.2_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A1.2_T2.js new file mode 100644 index 000000000..52fb9b52a --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A1.2_T2.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * CARRIAGE RETURN (U+000D) may occur between any two tokens + * + * @path ch07/7.3/S7.3_A1.2_T2.js + * @description Insert real CARRIAGE RETURN between tokens of var x=1 + */ + +//CHECK#1 +var +x += +1; +if (x !== 1) { + $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A1.3.js b/js/src/tests/test262/ch07/7.3/S7.3_A1.3.js new file mode 100644 index 000000000..bf8281937 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A1.3.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * LINE SEPARATOR (U+2028) may occur between any two tokens + * + * @path ch07/7.3/S7.3_A1.3.js + * @description Insert LINE SEPARATOR (\u2028) between tokens of var x=1 + */ + +// CHECK#1 +eval("\u2028var\u2028x\u2028=\u20281\u2028"); +if (x !== 1) { + $ERROR('#1: eval("\\u2028var\\u2028x\\u2028=\\u20281\\u2028"); x === 1. Actual: ' + (x)); +} + +//CHECK#2 +eval("\u2028" + "var" + "\u2028" + "x" + "\u2028" + "=" + "\u2028" + "1" + "\u2028"); +if (x !== 1) { + $ERROR('#2: eval("\\u2028" + "var" + "\\u2028" + "x" + "\\u2028" + "=" + "\\u2028" + "1" + "\\u2028"); x === 1. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A1.4.js b/js/src/tests/test262/ch07/7.3/S7.3_A1.4.js new file mode 100644 index 000000000..f761d0376 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A1.4.js @@ -0,0 +1,25 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * PARAGRAPH SEPARATOR (U+2029) may occur between any two tokens + * + * @path ch07/7.3/S7.3_A1.4.js + * @description Insert PARAGRAPH SEPARATOR (\u2029) between tokens of var x=1 + */ + +// CHECK#1 +eval("\u2029var\u2029x\u2029=\u20291\u2029"); +if (x !== 1) { + $ERROR('#1: eval("\\u2029var\\u2029x\\u2029=\\u20291\\u2029"); x === 1. Actual: ' + (x)); +} + +//CHECK#2 +eval("\u2029" + "var" + "\u2029" + "x" + "\u2029" + "=" + "\u2029" + "1" + "\u2029"); +if (x !== 1) { + $ERROR('#2: eval("\\u2029" + "var" + "\\u2029" + "x" + "\\u2029" + "=" + "\\u2029" + "1" + "\\u2029"); x === 1. Actual: ' + (x)); +} + + + + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A2.1_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A2.1_T1.js new file mode 100644 index 000000000..16cb25e69 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A2.1_T1.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * LINE FEED (U+000A) within strings is not allowed + * + * @path ch07/7.3/S7.3_A2.1_T1.js + * @description Insert LINE FEED (\u000A) into string + * @negative + */ + +// CHECK#1 +if (eval("'\u000Astr\u000Aing\u000A'") === "\u000Astr\u000Aing\u000A") { + $ERROR('#1: eval("\'\\u000Astr\\u000Aing\\u000A\'") === "\\u000Astr\\u000Aing\\u000A"'); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A2.1_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A2.1_T2.js new file mode 100644 index 000000000..f587ec97e --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A2.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. + +/** + * LINE FEED (U+000A) within strings is not allowed + * + * @path ch07/7.3/S7.3_A2.1_T2.js + * @description Use real LINE FEED into string + * @negative + */ + +//CHECK#1 +" +str +ing +"; + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A2.2_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A2.2_T1.js new file mode 100644 index 000000000..b58d20227 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A2.2_T1.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * CARRIAGE RETURN (U+000D) within strings is not allowed + * + * @path ch07/7.3/S7.3_A2.2_T1.js + * @description Insert CARRIAGE RETURN (\u000D) into string + * @negative + */ + +// CHECK#1 +if (eval("'\u000Dstr\u000Ding\u000D'") === "\u000Dstr\u000Ding\u000D") { + $ERROR('#1: eval("\'\\u000Dstr\\u000Ding\\u000D\'") === "\\u000Dstr\\u000Ding\\u000D"'); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A2.2_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A2.2_T2.js new file mode 100644 index 000000000..9e8c5e30d --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A2.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. + +/** + * CARRIAGE RETURN (U+000D) within strings is not allowed + * + * @path ch07/7.3/S7.3_A2.2_T2.js + * @description Insert real CARRIAGE RETURN into string + * @negative + */ + +//CHECK#1 +" +str +ing +"; + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A2.3.js b/js/src/tests/test262/ch07/7.3/S7.3_A2.3.js new file mode 100644 index 000000000..645dfaaf3 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A2.3.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * LINE SEPARATOR (U+2028) within strings is not allowed + * + * @path ch07/7.3/S7.3_A2.3.js + * @description Insert LINE SEPARATOR (\u2028) into string + * @negative + */ + +// CHECK#1 +if (eval("'\u2028str\u2028ing\u2028'") === "\u2028str\u2028ing\u2028") { + $ERROR('#1: eval("\'\\u2028str\\u2028ing\\u2028\'") === "\\u2028str\\u2028ing\\u2028"'); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A2.4.js b/js/src/tests/test262/ch07/7.3/S7.3_A2.4.js new file mode 100644 index 000000000..00e185037 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A2.4.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * PARAGRAPH SEPARATOR (U+2029) within strings is not allowed + * + * @path ch07/7.3/S7.3_A2.4.js + * @description Insert PARAGRAPH SEPARATOR (\u2029) into string + * @negative + */ + +// CHECK#1 +if (eval("'\u2029str\u2029ing\u2029'") === "\u2029str\u2029ing\u2029") { + $ERROR('#1: eval("\'\\u2029str\\u2029ing\\u2029\'") === "\\u2029str\\u2029ing\\u2029"'); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A3.1_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A3.1_T1.js new file mode 100644 index 000000000..f44c153cf --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A3.1_T1.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. + +/** + * Single line comments can not contain LINE FEED (U+000A) inside + * + * @path ch07/7.3/S7.3_A3.1_T1.js + * @description Insert LINE FEED (\u000A) into single line comment + * @negative + */ + +// CHECK#1 +eval("// single line \u000A comment"); + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A3.1_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A3.1_T2.js new file mode 100644 index 000000000..cb808a87a --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A3.1_T2.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. + +/** + * Single line comments can not contain LINE FEED (U+000A) inside + * + * @path ch07/7.3/S7.3_A3.1_T2.js + * @description Insert LINE FEED (\u000A) into begin of single line comment + * @negative + */ + +// CHECK#1 +eval("//\u000A single line comment"); + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A3.1_T3.js b/js/src/tests/test262/ch07/7.3/S7.3_A3.1_T3.js new file mode 100644 index 000000000..6394c939c --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A3.1_T3.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. + +/** + * Single line comments can not contain LINE FEED (U+000A) inside + * + * @path ch07/7.3/S7.3_A3.1_T3.js + * @description Insert real LINE FEED into single line comment + * @negative + */ + +// CHECK#1 +//single +line comment + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A3.2_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A3.2_T1.js new file mode 100644 index 000000000..2fa270693 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A3.2_T1.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. + +/** + * Single line comments can not contain CARRIAGE RETURN (U+000D) inside + * + * @path ch07/7.3/S7.3_A3.2_T1.js + * @description Insert CARRIAGE RETURN (\u000D) into single line comment + * @negative + */ + +// CHECK#1 +eval("// single line \u000D comment"); + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A3.2_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A3.2_T2.js new file mode 100644 index 000000000..9ffdc5cf9 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A3.2_T2.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. + +/** + * Single line comments can not contain CARRIAGE RETURN (U+000D) inside + * + * @path ch07/7.3/S7.3_A3.2_T2.js + * @description Insert CARRIAGE RETURN (\u000D) into begin of single line comment + * @negative + */ + +// CHECK#1 +eval("//\u000D single line comment"); + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A3.2_T3.js b/js/src/tests/test262/ch07/7.3/S7.3_A3.2_T3.js new file mode 100644 index 000000000..d16ee33be --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A3.2_T3.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. + +/** + * Single line comments can not contain CARRIAGE RETURN (U+000D) inside + * + * @path ch07/7.3/S7.3_A3.2_T3.js + * @description Insert real CARRIAGE RETURN into single line comment + * @negative + */ + +// CHECK#1 +//single +line comment + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A3.3_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A3.3_T1.js new file mode 100644 index 000000000..ae926c456 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A3.3_T1.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. + +/** + * Single line comments can not contain LINE SEPARATOR (U+2028) inside + * + * @path ch07/7.3/S7.3_A3.3_T1.js + * @description Insert LINE SEPARATOR (\u2028) into single line comment + * @negative + */ + +// CHECK#1 +eval("// single line \u2028 comment"); + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A3.3_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A3.3_T2.js new file mode 100644 index 000000000..43ff45843 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A3.3_T2.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. + +/** + * Single line comments can not contain LINE SEPARATOR (U+2028) inside + * + * @path ch07/7.3/S7.3_A3.3_T2.js + * @description Insert LINE SEPARATOR (\u2028) into begin of single line comment + * @negative + */ + +// CHECK#1 +eval("//\u2028 single line comment"); + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A3.4_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A3.4_T1.js new file mode 100644 index 000000000..1a8fae53f --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A3.4_T1.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. + +/** + * Single line comments can not contain PARAGRAPH SEPARATOR (U+2029) inside + * + * @path ch07/7.3/S7.3_A3.4_T1.js + * @description Insert PARAGRAPH SEPARATOR (\u2029) into single line comment + * @negative + */ + +// CHECK#1 +eval("// single line \u2029 comment"); + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A3.4_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A3.4_T2.js new file mode 100644 index 000000000..8a6c59d8d --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A3.4_T2.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. + +/** + * Single line comments can not contain PARAGRAPH SEPARATOR (U+2029) inside + * + * @path ch07/7.3/S7.3_A3.4_T2.js + * @description Insert PARAGRAPH SEPARATOR (\u2029) into begin of single line comment + * @negative + */ + +// CHECK#1 +eval("//\u2029 single line comment"); + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A4_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A4_T1.js new file mode 100644 index 000000000..df523f9a3 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A4_T1.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. + +/** + * Single line comments can contain Line Terminator at the end of line + * + * @path ch07/7.3/S7.3_A4_T1.js + * @description Insert LINE FEED (U+000A) into the end of single line comment + */ + +// CHECK#1 +eval("// single line comment\u000A"); + +// CHECK#2 +var x = 0; +eval("// single line comment\u000A x = 1;"); +if (x !== 1) { + $ERROR('#1: var x = 0; eval("// single line comment\\u000A x = 1;"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A4_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A4_T2.js new file mode 100644 index 000000000..d99dc7dc1 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A4_T2.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. + +/** + * Single line comments can contain Line Terminator at the end of line + * + * @path ch07/7.3/S7.3_A4_T2.js + * @description Insert CARRIAGE RETURN (U+000D) into the end of single line comment + */ + +// CHECK#1 +eval("// single line comment\u000D"); + +// CHECK#2 +var x = 0; +eval("// single line comment\u000D x = 1;"); +if (x !== 1) { + $ERROR('#1: var x = 0; eval("// single line comment\\u000D x = 1;"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A4_T3.js b/js/src/tests/test262/ch07/7.3/S7.3_A4_T3.js new file mode 100644 index 000000000..5677bc0cd --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A4_T3.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. + +/** + * Single line comments can contain Line Terminator at the end of line + * + * @path ch07/7.3/S7.3_A4_T3.js + * @description Insert LINE SEPARATOR (U+2028) into the end of single line comment + */ + +// CHECK#1 +eval("// single line comment\u2028"); + +// CHECK#2 +var x = 0; +eval("// single line comment\u2028 x = 1;"); +if (x !== 1) { + $ERROR('#1: var x = 0; eval("// single line comment\\u2028 x = 1;"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A4_T4.js b/js/src/tests/test262/ch07/7.3/S7.3_A4_T4.js new file mode 100644 index 000000000..c34f0e15e --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A4_T4.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. + +/** + * Single line comments can contain Line Terminator at the end of line + * + * @path ch07/7.3/S7.3_A4_T4.js + * @description Insert PARAGRAPH SEPARATOR (U+2029) into the end of single line comment + */ + +// CHECK#1 +eval("// single line comment\u2029"); + +// CHECK#2 +var x = 0; +eval("// single line comment\u2029 x = 1;"); +if (x !== 1) { + $ERROR('#1: var x = 0; eval("// single line comment\\u2029 x = 1;"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A5.1_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A5.1_T1.js new file mode 100644 index 000000000..fe8d7173e --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A5.1_T1.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. + +/** + * Multi line comment can contain LINE FEED (U+000A) + * + * @path ch07/7.3/S7.3_A5.1_T1.js + * @description Insert LINE FEED (U+000A) into multi line comment + */ + +// CHECK#1 +eval("/*\u000A multi line \u000A comment \u000A*/"); + +//CHECK#2 +var x = 0; +eval("/*\u000A multi line \u000A comment \u000A x = 1;*/"); +if (x !== 0) { + $ERROR('#1: var x = 0; eval("/*\\u000A multi line \\u000A comment \\u000A x = 1;*/"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A5.1_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A5.1_T2.js new file mode 100644 index 000000000..661df860e --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A5.1_T2.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Multi line comment can contain LINE FEED (U+000A) + * + * @path ch07/7.3/S7.3_A5.1_T2.js + * @description Insert real LINE FEED into multi line comment + */ + +/*CHECK#1*/ +var x = 0; +/* +multi +line +comment +x = 1; +*/ +if (x !== 0) { + $ERROR('#1: var x = 0; /*\\nmulti\\nline\\ncomment\\nx = 1;\\n*/ x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A5.2_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A5.2_T1.js new file mode 100644 index 000000000..20c5dd194 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A5.2_T1.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. + +/** + * Multi line comment can contain CARRIAGE RETURN (U+000D) + * + * @path ch07/7.3/S7.3_A5.2_T1.js + * @description Insert CARRIAGE RETURN (U+000D) into multi line comment + */ + +// CHECK#1 +eval("/*\u000D multi line \u000D comment \u000D*/"); + +//CHECK#2 +var x = 0; +eval("/*\u000D multi line \u000D comment \u000D x = 1;*/"); +if (x !== 0) { + $ERROR('#1: var x = 0; eval("/*\\u000D multi line \\u000D comment \\u000D x = 1;*/"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A5.2_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A5.2_T2.js new file mode 100644 index 000000000..a83a2be2d --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A5.2_T2.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Multi line comment can contain CARRIAGE RETURN (U+000D) + * + * @path ch07/7.3/S7.3_A5.2_T2.js + * @description Insert real CARRIAGE RETURN into multi line comment + */ + +/*CHECK#1*/ +var x = 0; +/* +multi +line +comment +x = 1; +*/ +if (x !== 0) { + $ERROR('#1: var x = 0; /*\\rmulti\\rline\\rcomment\\rx = 1;\\r*/ x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A5.3.js b/js/src/tests/test262/ch07/7.3/S7.3_A5.3.js new file mode 100644 index 000000000..501392bc0 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A5.3.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. + +/** + * Multi line comment can contain LINE SEPARATOR (U+2028) + * + * @path ch07/7.3/S7.3_A5.3.js + * @description Insert LINE SEPARATOR (U+2028) into multi line comment + */ + +// CHECK#1 +eval("/*\u2028 multi line \u2028 comment \u2028*/"); + +//CHECK#2 +var x = 0; +eval("/*\u2028 multi line \u2028 comment \u2028 x = 1;*/"); +if (x !== 0) { + $ERROR('#1: var x = 0; eval("/*\\u2028 multi line \\u2028 comment \\u2028 x = 1;*/"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A5.4.js b/js/src/tests/test262/ch07/7.3/S7.3_A5.4.js new file mode 100644 index 000000000..8f8597477 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A5.4.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. + +/** + * Multi line comment can contain LINE SEPARATOR (U+2029) + * + * @path ch07/7.3/S7.3_A5.4.js + * @description Insert PARAGRAPH SEPARATOR (U+2029) into multi line comment + */ + +// CHECK#1 +eval("/*\u2029 multi line \u2029 comment \u2029*/"); + +//CHECK#2 +var x = 0; +eval("/*\u2029 multi line \u2029 comment \u2029 x = 1;*/"); +if (x !== 0) { + $ERROR('#1: var x = 0; eval("/*\\u2029 multi line \\u2029 comment \\u2029 x = 1;*/"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A6_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A6_T1.js new file mode 100644 index 000000000..89b3751f6 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A6_T1.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Line Terminator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits + * + * @path ch07/7.3/S7.3_A6_T1.js + * @description Insert LINE FEED (U+000A) in var x + * @negative + */ + +var\u000Ax; + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A6_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A6_T2.js new file mode 100644 index 000000000..3dc52d206 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A6_T2.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Line Terminator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits + * + * @path ch07/7.3/S7.3_A6_T2.js + * @description Insert CARRIAGE RETURN (U+000D) in var x + * @negative + */ + +var\u000Dx; + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A6_T3.js b/js/src/tests/test262/ch07/7.3/S7.3_A6_T3.js new file mode 100644 index 000000000..62d6ef10f --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A6_T3.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Line Terminator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits + * + * @path ch07/7.3/S7.3_A6_T3.js + * @description Insert LINE SEPARATOR (U+2028) in var x + * @negative + */ + +var\u2028x; + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A6_T4.js b/js/src/tests/test262/ch07/7.3/S7.3_A6_T4.js new file mode 100644 index 000000000..cd5d2d40a --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A6_T4.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Line Terminator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits + * + * @path ch07/7.3/S7.3_A6_T4.js + * @description Insert PARAGRAPH SEPARATOR (U+2029) in var x + * @negative + */ + +var\u2029x; + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A7_T1.js b/js/src/tests/test262/ch07/7.3/S7.3_A7_T1.js new file mode 100644 index 000000000..861b737e4 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A7_T1.js @@ -0,0 +1,57 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Line Terminators between operators are allowed + * + * @path ch07/7.3/S7.3_A7_T1.js + * @description Insert Line Terminator in var x=y+z + */ + +// CHECK#1 +var y=2; +var z=3; +var +x += +y ++ +z +; +if (x !== 5) { + $ERROR('#1: var\\nx\\n=\\ny\\n+\\nz\\n; x === 5. Actual: ' + (x)); +} +x=0; + +// CHECK#2 +var y=2; +var z=3; +var +x += +y ++ +z +; +if (x !== 5) { + $ERROR('#2: var\\nx\\n=\\ny\\n+\\nz\\n; x === 5. Actual: ' + (x)); +} +x=0; + +// CHECK#3 +var y=2; +var z=3; +eval("\u2028var\u2028x\u2028=\u2028y\u2028+\u2028z\u2028"); +if (x !== 5) { + $ERROR('#3: eval("\\u2028var\\u2028x\\u2028=\\u2028y\\u2028+\\u2028z\\u2028"); x === 5. Actual: ' + (x)); +} +x=0; + +// CHECK#4 +var y=2; +var z=3; +eval("\u2029var\u2029x\u2029=\u2029y\u2029+\u2029z\u2029"); +if (x !== 5) { + $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029+\\u2029z\\u2029"); x === 5. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A7_T2.js b/js/src/tests/test262/ch07/7.3/S7.3_A7_T2.js new file mode 100644 index 000000000..cdc5801c9 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A7_T2.js @@ -0,0 +1,57 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Line Terminators between operators are allowed + * + * @path ch07/7.3/S7.3_A7_T2.js + * @description Insert Line Terminator in var x=y-z + */ + +// CHECK#1 +var y=3; +var z=2; +var +x += +y +- +z +; +if (x !== 1) { + $ERROR('#1: var\\nx\\n=\\ny\\n-\\nz\\n; x === 1. Actual: ' + (x)); +} +x=0; + +// CHECK#2 +var y=3; +var z=2; +var +x += +y +- +z +; +if (x !== 1) { + $ERROR('#2: var\\nx\\n=\\ny\\n-\\nz\\n; x === 1. Actual: ' + (x)); +} +x=0; + +// CHECK#3 +var y=3; +var z=2; +eval("\u2028var\u2028x\u2028=\u2028y\u2028-\u2028z\u2028"); +if (x !== 1) { + $ERROR('#3: eval("\\u2028var\\u2028x\\u2028=\\u2028y\\u2028-\\u2028z\\u2028"); x === 1. Actual: ' + (x)); +} +x=0; + +// CHECK#4 +var y=3; +var z=2; +eval("\u2029var\u2029x\u2029=\u2029y\u2029-\u2029z\u2029"); +if (x !== 1) { + $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029-\\u2029z\\u2029"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A7_T3.js b/js/src/tests/test262/ch07/7.3/S7.3_A7_T3.js new file mode 100644 index 000000000..1c83956da --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A7_T3.js @@ -0,0 +1,57 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Line Terminators between operators are allowed + * + * @path ch07/7.3/S7.3_A7_T3.js + * @description Insert Line Terminator in var x=y*z + */ + +// CHECK#1 +var y=3; +var z=2; +var +x += +y +* +z +; +if (x !== 6) { + $ERROR('#1: var\\nx\\n=\\ny\\n*\\nz\\n; x === 6. Actual: ' + (x)); +} +x=0; + +// CHECK#2 +var y=3; +var z=2; +var +x += +y +* +z +; +if (x !== 6) { + $ERROR('#2: var\\nx\\n=\\ny\\n*\\nz\\n; x === 6. Actual: ' + (x)); +} +x=0; + +// CHECK#3 +var y=3; +var z=2; +eval("\u2028var\u2028x\u2028=\u2028y\u2028*\u2028z\u2028"); +if (x !== 6) { + $ERROR('#3: eval("\\u2028var\\u2028x\\u2028=\\u2028y\\u2028*\\u2028z\\u2028"); x === 6. Actual: ' + (x)); +} +x=0; + +// CHECK#4 +var y=3; +var z=2; +eval("\u2029var\u2029x\u2029=\u2029y\u2029*\u2029z\u2029"); +if (x !== 6) { + $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029*\\u2029z\\u2029"); x === 6. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A7_T4.js b/js/src/tests/test262/ch07/7.3/S7.3_A7_T4.js new file mode 100644 index 000000000..fad60b4cb --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A7_T4.js @@ -0,0 +1,57 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Line Terminators between operators are allowed + * + * @path ch07/7.3/S7.3_A7_T4.js + * @description Insert Line Terminator in var x=y/z + */ + +// CHECK#1 +var y=12; +var z=2; +var +x += +y +/ +z +; +if (x !== 6) { + $ERROR('#1: var\\nx\\n=\\ny\\n/\\nz\\n; x === 6. Actual: ' + (x)); +} +x=0; + +// CHECK#2 +var y=12; +var z=2; +var +x += +y +/ +z +; +if (x !== 6) { + $ERROR('#2: var\\nx\\n=\\ny\\n/\\nz\\n; x === 6. Actual: ' + (x)); +} +x=0; + +// CHECK#3 +var y=12; +var z=2; +eval("\u2028var\u2028x\u2028=\u2028y\u2028/\u2028z\u2028"); +if (x !== 6) { + $ERROR('#3: eval("\\u2028var\\u2028x\\u2028=\\u2028y\\u2028/\\u2028z\\u2028"); x === 6. Actual: ' + (x)); +} +x=0; + +// CHECK#4 +var y=12; +var z=2; +eval("\u2029var\u2029x\u2029=\u2029y\u2029/\u2029z\u2029"); +if (x !== 6) { + $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029/\\u2029z\\u2029"); x === 6. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A7_T5.js b/js/src/tests/test262/ch07/7.3/S7.3_A7_T5.js new file mode 100644 index 000000000..f7aff0122 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A7_T5.js @@ -0,0 +1,57 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Line Terminators between operators are allowed + * + * @path ch07/7.3/S7.3_A7_T5.js + * @description Insert Line Terminator in var x=y%z + */ + +// CHECK#1 +var y=16; +var z=10; +var +x += +y +% +z +; +if (x !== 6) { + $ERROR('#1: var\\nx\\n=\\ny\\n%\\nz\\n; x === 6. Actual: ' + (x)); +} +x=0; + +// CHECK#2 +var y=16; +var z=10; +var +x += +y +% +z +; +if (x !== 6) { + $ERROR('#2: var\\nx\\n=\\ny\\n%\\nz\\n; x === 6. Actual: ' + (x)); +} +x=0; + +// CHECK#3 +var y=16; +var z=10; +eval("\u2028var\u2028x\u2028=\u2028y\u2028%\u2028z\u2028"); +if (x !== 6) { + $ERROR('#3: eval("\\u2028var\\u2028x\\u2028=\\u2028y\\u2028%\\u2028z\\u2028"); x === 6. Actual: ' + (x)); +} +x=0; + +// CHECK#4 +var y=16; +var z=10; +eval("\u2029var\u2029x\u2029=\u2029y\u2029%\u2029z\u2029"); +if (x !== 6) { + $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029%\\u2029z\\u2029"); x === 6. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A7_T6.js b/js/src/tests/test262/ch07/7.3/S7.3_A7_T6.js new file mode 100644 index 000000000..9dc8c0141 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A7_T6.js @@ -0,0 +1,57 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Line Terminators between operators are allowed + * + * @path ch07/7.3/S7.3_A7_T6.js + * @description Insert Line Terminator in var x=y>>z + */ + +// CHECK#1 +var y=16; +var z=3; +var +x += +y +>> +z +; +if (x !== 2) { + $ERROR('#1: var\\nx\\n=\\ny\\n>>\\nz\\n; x === 2. Actual: ' + (x)); +} +x=0; + +// CHECK#2 +var y=16; +var z=3; +var +x += +y +>> +z +; +if (x !== 2) { + $ERROR('#2: var\\nx\\n=\\ny\\n>>\\nz\\n; x === 2. Actual: ' + (x)); +} +x=0; + +// CHECK#3 +var y=16; +var z=3; +eval("\u2028var\u2028x\u2028=\u2028y\u2028>>\u2028z\u2028"); +if (x !== 2) { + $ERROR('#3: eval("\\u2028var\\u2028x\\u2028=\\u2028y\\u2028>>\\u2028z\\u2028"); x === 2. Actual: ' + (x)); +} +x=0; + +// CHECK#4 +var y=16; +var z=3; +eval("\u2029var\u2029x\u2029=\u2029y\u2029>>\u2029z\u2029"); +if (x !== 2) { + $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029>>\\u2029z\\u2029"); x === 2. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A7_T7.js b/js/src/tests/test262/ch07/7.3/S7.3_A7_T7.js new file mode 100644 index 000000000..510b958c4 --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A7_T7.js @@ -0,0 +1,57 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Line Terminators between operators are allowed + * + * @path ch07/7.3/S7.3_A7_T7.js + * @description Insert Line Terminator in var x=y<<z + */ + +// CHECK#1 +var y=2; +var z=3; +var +x += +y +<< +z +; +if (x !== 16) { + $ERROR('#1: var\\nx\\n=\\ny\\n<<\\nz\\n; x === 16. Actual: ' + (x)); +} +x=0; + +// CHECK#2 +var y=2; +var z=3; +var +x += +y +<< +z +; +if (x !== 16) { + $ERROR('#2: var\\nx\\n=\\ny\\n<<\\nz\\n; x ===16 '); +} +x=0; + +// CHECK#3 +var y=2; +var z=3; +eval("\u2028var\u2028x\u2028=\u2028y\u2028<<\u2028z\u2028"); +if (x !== 16) { + $ERROR('#3: eval("\\u2028var\\u2028x\\u2028=\\u2028y\\u2028<<\\u2028z\\u2028"); x === 16. Actual: ' + (x)); +} +x=0; + +// CHECK#4 +var y=2; +var z=3; +eval("\u2029var\u2029x\u2029=\u2029y\u2029<<\u2029z\u2029"); +if (x !== 16) { + $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029<<\\u2029z\\u2029"); x === 16. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/S7.3_A7_T8.js b/js/src/tests/test262/ch07/7.3/S7.3_A7_T8.js new file mode 100644 index 000000000..1b55b96ce --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/S7.3_A7_T8.js @@ -0,0 +1,57 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Line Terminators between operators are allowed + * + * @path ch07/7.3/S7.3_A7_T8.js + * @description Insert Line Terminator in var x=y<z + */ + +// CHECK#1 +var y=2; +var z=3; +var +x += +y +< +z +; +if (x !== true) { + $ERROR('#1: var\\nx\\n=\\ny\\n<\\nz\\n; x === true. Actual: ' + (x)); +} +x=0; + +// CHECK#2 +var y=2; +var z=3; +var +x += +y +< +z +; +if (x !== true) { + $ERROR('#2: var\\nx\\n=\\ny\\n<\\nz\\n; x === true. Actual: ' + (x)); +} +x=0; + +// CHECK#3 +var y=2; +var z=3; +eval("\u2028var\u2028x\u2028=\u2028y\u2028<\u2028z\u2028"); +if (x !== true) { + $ERROR('#3: eval("\\u2028var\\u2028x\\u2028=\\u2028y\\u2028<\\u2028z\\u2028"); x === true. Actual: ' + (x)); +} +x=0; + +// CHECK#4 +var y=2; +var z=3; +eval("\u2029var\u2029x\u2029=\u2029y\u2029<\u2029z\u2029"); +if (x !== true) { + $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029<\\u2029z\\u2029"); x === true. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.3/browser.js b/js/src/tests/test262/ch07/7.3/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/browser.js diff --git a/js/src/tests/test262/ch07/7.3/shell.js b/js/src/tests/test262/ch07/7.3/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.3/shell.js |