diff options
Diffstat (limited to 'js/src/tests/test262/ch07/7.2')
47 files changed, 883 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A1.1_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A1.1_T1.js new file mode 100644 index 000000000..1c8e5a9ca --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_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. + +/** + * HORIZONTAL TAB (U+0009) between any two tokens is allowed + * + * @path ch07/7.2/S7.2_A1.1_T1.js + * @description Insert HORIZONTAL TAB(\u0009 and \t) between tokens of var x=1 + */ + +// CHECK#1 +eval("\u0009var\u0009x\u0009=\u00091\u0009"); +if (x !== 1) { + $ERROR('#1: eval("\\u0009var\\u0009x\\u0009=\\u00091\\u0009"); x === 1. Actual: ' + (x)); +} + +//CHECK#2 +eval("\u0009" + "var" + "\u0009" + "x" + "\u0009" + "=" + "\u0009" + "1" + "\u0009"); +if (x !== 1) { + $ERROR('#2: eval("\\u0009" + "var" + "\\u0009" + "x" + "\\u0009" + "=" + "\\u0009" + "1" + "\\u0009"); x === 1. Actual: ' + (x)); +} + +//CHECK#3 +eval("\tvar\tx\t=\t1\t"); +if (x !== 1) { + $ERROR('#3: eval("\\tvar\\tx\\t=\\t1\\t"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +eval("\t" + "var" + "\t" + "x" + "\t" + "=" + "\t" + "1" + "\t"); +if (x !== 1) { + $ERROR('#4: eval("\\t" + "var" + "\\t" + "x" + "\\t" + "=" + "\\t" + "1" + "\\t"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +eval("\u0009" + "var" + "\t" + "x" + "\u0009" + "=" + "\t" + "1" + "\u0009"); +if (x !== 1) { + $ERROR('#5: eval("\\u0009" + "var" + "\\t" + "x" + "\\u0009" + "=" + "\\t" + "1" + "\\u0009"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A1.1_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A1.1_T2.js new file mode 100644 index 000000000..081c60ef3 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A1.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. + +/** + * HORIZONTAL TAB (U+0009) between any two tokens is allowed + * + * @path ch07/7.2/S7.2_A1.1_T2.js + * @description Insert real HORIZONTAL TAB between tokens of var x=1 + */ + +//CHECK#1 + var x = 1 ; +if (x !== 1) { + $ERROR('#1: var x = 1 ; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +eval(" var\tx =\t2 "); +if (x !== 2) { + $ERROR('#2: var\\tx =\\t1 ; x === 2. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A1.2_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A1.2_T1.js new file mode 100644 index 000000000..19be1c7e2 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_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. + +/** + * VERTICAL TAB (U+000B) between any two tokens is allowed + * + * @path ch07/7.2/S7.2_A1.2_T1.js + * @description Insert VERTICAL TAB(\u000B and \v) between tokens of var x=1 + */ + +// CHECK#1 +eval("\u000Bvar\u000Bx\u000B=\u000B1\u000B"); +if (x !== 1) { + $ERROR('#1: eval("\\u000Bvar\\u000Bx\\u000B=\\u000B1\\u000B"); x === 1. Actual: ' + (x)); +} + +//CHECK#2 +eval("\u000B" + "var" + "\u000B" + "x" + "\u000B" + "=" + "\u000B" + "1" + "\u000B"); +if (x !== 1) { + $ERROR('#2: eval("\\u000B" + "var" + "\\u000B" + "x" + "\\u000B" + "=" + "\\u000B" + "1" + "\\u000B"); x === 1. Actual: ' + (x)); +} + +//CHECK#3 +eval("\vvar\vx\v=\v1\v"); +if (x !== 1) { + $ERROR('#3: eval("\\vvar\\vx\\v=\\v1\\v"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +eval("\v" + "var" + "\v" + "x" + "\v" + "=" + "\v" + "1" + "\v"); +if (x !== 1) { + $ERROR('#4: eval("\\v" + "var" + "\\v" + "x" + "\\v" + "=" + "\\v" + "1" + "\\v"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +eval("\u000B" + "var" + "\v" + "x" + "\u000B" + "=" + "\v" + "1" + "\u000B"); +if (x !== 1) { + $ERROR('#5: eval("\\u000B" + "var" + "\\v" + "x" + "\\u000B" + "=" + "\\v" + "1" + "\\u000B"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A1.2_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A1.2_T2.js new file mode 100644 index 000000000..f5ab425f5 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A1.2_T2.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. + +/** + * VERTICAL TAB (U+000B) between any two tokens is allowed + * + * @path ch07/7.2/S7.2_A1.2_T2.js + * @description Insert real VERTICAL TAB between tokens of var x=1 + */ + +//CHECK#1 +varx=1; +if (x !== 1) { + $ERROR('#1: varx=1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +eval("var\vx=\v1"); +if (x !== 1) { + $ERROR('#2: var\\vx=\\v1; x === 1. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A1.3_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A1.3_T1.js new file mode 100644 index 000000000..eb8c2f85c --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A1.3_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. + +/** + * FORM FEED (U+000C) between any two tokens is allowed + * + * @path ch07/7.2/S7.2_A1.3_T1.js + * @description Insert FORM FEED(\u000C and \f) between tokens of var x=1 + */ + +// CHECK#1 +eval("\u000Cvar\u000Cx\u000C=\u000C1\u000C"); +if (x !== 1) { + $ERROR('#1: eval("\\u000Cvar\\u000Cx\\u000C=\\u000C1\\u000C"); x === 1. Actual: ' + (x)); +} + +//CHECK#2 +eval("\u000C" + "var" + "\u000C" + "x" + "\u000C" + "=" + "\u000C" + "1" + "\u000C"); +if (x !== 1) { + $ERROR('#2: eval("\\u000C" + "var" + "\\u000C" + "x" + "\\u000C" + "=" + "\\u000C" + "1" + "\\u000C"); x === 1. Actual: ' + (x)); +} + +//CHECK#3 +eval("\fvar\fx\f=\f1\f"); +if (x !== 1) { + $ERROR('#3: eval("\\fvar\\fx\\f=\\f1\\f"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +eval("\f" + "var" + "\f" + "x" + "\f" + "=" + "\f" + "1" + "\f"); +if (x !== 1) { + $ERROR('#4: eval("\\f" + "var" + "\\f" + "x" + "\\f" + "=" + "\\f" + "1" + "\\f"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +eval("\u000C" + "var" + "\f" + "x" + "\u000C" + "=" + "\f" + "1" + "\u000C"); +if (x !== 1) { + $ERROR('#5: eval("\\u000C" + "var" + "\\f" + "x" + "\\u000C" + "=" + "\\f" + "1" + "\\u000C"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A1.3_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A1.3_T2.js new file mode 100644 index 000000000..90fe95742 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A1.3_T2.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. + +/** + * FORM FEED (U+000C) between any two tokens is allowed + * + * @path ch07/7.2/S7.2_A1.3_T2.js + * @description Insert real FORM FEED between tokens of var x=1 + */ + +//CHECK#1 +varx=1; +if (x !== 1) { + $ERROR('#1: varx=1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +eval("var\fx=\f1"); +if (x !== 1) { + $ERROR('#2: var\\fx=\\f1; x === 1. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A1.4_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A1.4_T1.js new file mode 100644 index 000000000..1f10f9166 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A1.4_T1.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. + +/** + * SPACE (U+0020) between any two tokens is allowed + * + * @path ch07/7.2/S7.2_A1.4_T1.js + * @description Insert SPACE(\u0020) between tokens of var x=1 + */ + +// CHECK#1 +eval("\u0020var\u0020x\u0020=\u00201\u0020"); +if (x !== 1) { + $ERROR('#1: eval("\\u0020var\\u0020x\\u0020=\\u00201\\u0020"); x === 1;'); +} + +//CHECK#2 +eval("\u0020" + "var" + "\u0020" + "x" + "\u0020" + "=" + "\u0020" + "1" + "\u0020"); +if (x !== 1) { + $ERROR('#2: eval("\\u0020" + "var" + "\\u0020" + "x" + "\\u0020" + "=" + "\\u0020" + "1" + "\\u0020"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A1.4_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A1.4_T2.js new file mode 100644 index 000000000..67c9c96c1 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A1.4_T2.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. + +/** + * SPACE (U+0020) between any two tokens is allowed + * + * @path ch07/7.2/S7.2_A1.4_T2.js + * @description Insert real SPACE between tokens of var x=1 + */ + +//CHECK#1 +eval("\u0020var x\u0020= 1\u0020"); +if (x !== 1) { + $ERROR('#1: eval("\\u0020var x\\u0020= 1\\u0020"); x === 1. Actual: ' + (x)); +} + +//CHECK#2 + var x = 1 ; +if (x !== 1) { + $ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A1.5_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A1.5_T1.js new file mode 100644 index 000000000..59339116e --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A1.5_T1.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. + +/** + * NO-BREAK SPACE (U+00A0) between any two tokens is allowed + * + * @path ch07/7.2/S7.2_A1.5_T1.js + * @description Insert NO-BREAK SPACE(\u00A0) between tokens of var x=1 + */ + +// CHECK#1 +eval("\u00A0var\u00A0x\u00A0=\u00A01\u00A0"); +if (x !== 1) { + $ERROR('#1: eval("\\u00A0var\\u00A0x\\u00A0=\\u00A01\\u00A0"); x === 1. Actual: ' + (x)); +} + +//CHECK#2 +eval("\u00A0" + "var" + "\u00A0" + "x" + "\u00A0" + "=" + "\u00A0" + "1" + "\u00A0"); +if (x !== 1) { + $ERROR('#2: eval("\\u00A0" + "var" + "\\u00A0" + "x" + "\\u00A0" + "=" + "\\u00A0" + "1" + "\\u00A0"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A1.5_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A1.5_T2.js new file mode 100644 index 000000000..e4635e697 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A1.5_T2.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. + +/** + * NO-BREAK SPACE (U+00A0) between any two tokens is allowed + * + * @path ch07/7.2/S7.2_A1.5_T2.js + * @description Insert real NO-BREAK SPACE between tokens of var x=1 + */ + +//CHECK#1 +eval("\u00A0var x\u00A0= 1\u00A0"); +if (x !== 1) { + $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); +} + +//CHECK#2 + var x = 1 ; +if (x !== 1) { + $ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A2.1_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A2.1_T1.js new file mode 100644 index 000000000..c7fdaaf3e --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A2.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. + +/** + * HORIZONTAL TAB (U+0009) may occur within strings + * + * @path ch07/7.2/S7.2_A2.1_T1.js + * @description Use HORIZONTAL TAB(\u0009 and \t) + */ + +// CHECK#1 +if (eval("'\u0009str\u0009ing\u0009'") !== "\u0009str\u0009ing\u0009") { + $ERROR('#1: eval("\'\\u0009str\\u0009ing\\u0009\'") === "\\u0009str\\u0009ing\\u0009"'); +} + +//CHECK#2 +if (eval("'\tstr\ting\t'") !== "\tstr\ting\t") { + $ERROR('#2: eval("\'\\tstr\\ting\\t\'") === "\\tstr\\ting\\t"'); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A2.1_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A2.1_T2.js new file mode 100644 index 000000000..7a89875ba --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * HORIZONTAL TAB (U+0009) may occur within strings + * + * @path ch07/7.2/S7.2_A2.1_T2.js + * @description Use real HORIZONTAL TAB + */ + +//CHECK#1 +if (" str ing " !== "\u0009str\u0009ing\u0009") { + $ERROR('#1: " str ing " === "\\u0009str\\u0009ing\\u0009"'); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A2.2_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A2.2_T1.js new file mode 100644 index 000000000..69c8de8ff --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A2.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. + +/** + * VERTICAL TAB (U+000B) may occur within strings + * + * @path ch07/7.2/S7.2_A2.2_T1.js + * @description Use VERTICAL TAB(\u000B and \v) + */ + +// CHECK#1 +if (eval("'\u000Bstr\u000Bing\u000B'") !== "\u000Bstr\u000Bing\u000B") { + $ERROR('#1: eval("\'\\u000Bstr\\u000Bing\\u000B\'") === "\\u000Bstr\\u000Bing\\u000B"'); +} + +//CHECK#2 +if (eval("'\vstr\ving\v'") !== "\vstr\ving\v") { + $ERROR('#2: eval("\'\\vstr\\ving\\v\'") === "\\vstr\\ving\\v"'); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A2.2_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A2.2_T2.js new file mode 100644 index 000000000..f7b415972 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * VERTICAL TAB (U+000B) may occur within strings + * + * @path ch07/7.2/S7.2_A2.2_T2.js + * @description Use real VERTICAL TAB + */ + +//CHECK#1 +if ("string" !== "\u000Bstr\u000Bing\u000B") { + $ERROR('#1: "string" === "\\u000Bstr\\u000Bing\\u000B"'); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A2.3_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A2.3_T1.js new file mode 100644 index 000000000..9b30396fc --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A2.3_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. + +/** + * FORM FEED (U+000C) may occur within strings + * + * @path ch07/7.2/S7.2_A2.3_T1.js + * @description Use FORM FEED(\u000C and \f) + */ + +// CHECK#1 +if (eval("'\u000Cstr\u000Cing\u000C'") !== "\u000Cstr\u000Cing\u000C") { + $ERROR('#1: eval("\'\\u000Cstr\\u000Cing\\u000C\'") === "\\u000Cstr\\u000Cing\\u000C"'); +} + +//CHECK#2 +if (eval("'\fstr\fing\f'") !== "\fstr\fing\f") { + $ERROR('#2: eval("\'\\fstr\\fing\\f\'") === "\\fstr\\fing\\f"'); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A2.3_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A2.3_T2.js new file mode 100644 index 000000000..a575f8a0d --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * FORM FEED (U+000C) may occur within strings + * + * @path ch07/7.2/S7.2_A2.3_T2.js + * @description Use real FORM FEED + */ + +//CHECK#1 +if ("string" !== "\u000Cstr\u000Cing\u000C") { + $ERROR('#1: "string" === "\\u000Cstr\\u000Cing\\u000C"'); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A2.4_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A2.4_T1.js new file mode 100644 index 000000000..4b41932c7 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A2.4_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. + +/** + * SPACE (U+0020) may occur within strings + * + * @path ch07/7.2/S7.2_A2.4_T1.js + * @description Use SPACE(\u0020) + */ + +// CHECK#1 +if (eval("'\u0020str\u0020ing\u0020'") !== "\u0020str\u0020ing\u0020") { + $ERROR('#1: eval("\'\\u0020str\\u0020ing\\u0020\'") === "\\u0020str\\u0020ing\\u0020"'); +} + +//CHECK#2 +if (eval("' str ing '") !== " str ing ") { + $ERROR('#2: eval("\' str ing \'") === " str ing "'); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A2.4_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A2.4_T2.js new file mode 100644 index 000000000..b61d2313d --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * SPACE (U+0020) may occur within strings + * + * @path ch07/7.2/S7.2_A2.4_T2.js + * @description Use real SPACE + */ + +//CHECK#1 +if (" str ing " !== "\u0020str\u0020ing\u0020") { + $ERROR('#1: " str ing " === "\\u0020str\\u0020ing\\u0020"'); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A2.5_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A2.5_T1.js new file mode 100644 index 000000000..60fb7f358 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A2.5_T1.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. + +/** + * NO-BREAK SPACE (U+00A0) may occur within strings + * + * @path ch07/7.2/S7.2_A2.5_T1.js + * @description Use NO-BREAK SPACE(\u00A0) + */ + +// CHECK#1 +if (eval("'\u00A0str\u00A0ing\u00A0'") !== "\u00A0str\u00A0ing\u00A0") { + $ERROR('#1: eval("\'\\u00A0str\\u00A0ing\\u00A0\'") === "\\u00A0str\\u00A0ing\\u00A0"'); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A2.5_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A2.5_T2.js new file mode 100644 index 000000000..0cf26e596 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * NO-BREAK SPACE (U+00A0) may occur within strings + * + * @path ch07/7.2/S7.2_A2.5_T2.js + * @description Use real NO-BREAK SPACE + */ + +//CHECK#1 +if (" str ing " !== "\u00A0str\u00A0ing\u00A0") { + $ERROR('#1: " str ing " === "\\u00A0str\\u00A0ing\\u00A0"'); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A3.1_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A3.1_T1.js new file mode 100644 index 000000000..c8eae5be2 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A3.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. + +/** + * Single line comment can contain HORIZONTAL TAB (U+0009) + * + * @path ch07/7.2/S7.2_A3.1_T1.js + * @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) { + $ERROR('#1: var x = 0; eval("//\\u0009 single line \\u0009 comment \\u0009 x = 1;"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A3.1_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A3.1_T2.js new file mode 100644 index 000000000..b5b479240 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * Single line comment can contain HORIZONTAL TAB (U+0009) + * + * @path ch07/7.2/S7.2_A3.1_T2.js + * @description Use real HORIZONTAL TAB + */ + +//CHECK#1 +var x = 0; +// single line comment x = 1; +if (x !== 0) { + $ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A3.2_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A3.2_T1.js new file mode 100644 index 000000000..435a2493f --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A3.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. + +/** + * Single line comment can contain VERTICAL TAB (U+000B) + * + * @path ch07/7.2/S7.2_A3.2_T1.js + * @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) { + $ERROR('#1: var x = 0; eval("//\\u000B single line \\u000B comment \\u000B x = 1;"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A3.2_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A3.2_T2.js new file mode 100644 index 000000000..cfdd6bc0a --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * Single line comment can contain VERTICAL TAB (U+000B) + * + * @path ch07/7.2/S7.2_A3.2_T2.js + * @description Use real VERTICAL TAB + */ + +//CHECK#1 +var x = 0; +//singlelinecommentx = 1; +if (x !== 0) { + $ERROR('#1: var x = 0; //singlelinecommentx = 1; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A3.3_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A3.3_T1.js new file mode 100644 index 000000000..260d07073 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A3.3_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 comment can contain FORM FEED (U+000C) + * + * @path ch07/7.2/S7.2_A3.3_T1.js + * @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) { + $ERROR('#1: var x = 0; eval("//\\u000C single line \\u000C comment \\u000C x = 1;"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A3.3_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A3.3_T2.js new file mode 100644 index 000000000..f1ce32510 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * Single line comment can contain FORM FEED (U+000C) + * + * @path ch07/7.2/S7.2_A3.3_T2.js + * @description Use real FORM FEED + */ + +//CHECK#1 +var x = 0; +//singlelinecommentx = 1; +if (x !== 0) { + $ERROR('#1: var x = 0; //singlelinecommentx = 1; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A3.4_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A3.4_T1.js new file mode 100644 index 000000000..41264606b --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A3.4_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 comment can contain SPACE (U+0020) + * + * @path ch07/7.2/S7.2_A3.4_T1.js + * @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) { + $ERROR('#1: var x = 0; eval("//\\u0020 single line \\u0020 comment \\u0020 x = 1;"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A3.4_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A3.4_T2.js new file mode 100644 index 000000000..bfc4650fe --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * Single line comment can contain SPACE (U+0020) + * + * @path ch07/7.2/S7.2_A3.4_T2.js + * @description Use real SPACE + */ + +//CHECK#1 +var x = 0; +// single line comment x = 1; +if (x !== 0) { + $ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A3.5_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A3.5_T1.js new file mode 100644 index 000000000..6d12abddf --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A3.5_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 comment can contain NO-BREAK SPACE (U+00A0) + * + * @path ch07/7.2/S7.2_A3.5_T1.js + * @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) { + $ERROR('#1: var x = 0; eval("//\\u00A0 single line \\u00A0 comment \\u00A0 x = 1;"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A3.5_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A3.5_T2.js new file mode 100644 index 000000000..2085a3b38 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * Single line comment can contain NO-BREAK SPACE (U+00A0) + * + * @path ch07/7.2/S7.2_A3.5_T2.js + * @description Use real NO-BREAK SPACE + */ + +//CHECK#1 +var x = 0; +// single line comment x = 1; +if (x !== 0) { + $ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A4.1_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A4.1_T1.js new file mode 100644 index 000000000..6881a144f --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A4.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 HORIZONTAL TAB (U+0009) + * + * @path ch07/7.2/S7.2_A4.1_T1.js + * @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) { + $ERROR('#1: var x = 0; eval("/*\\u0009 multi line \\u0009 comment \\u0009 x = 1;*/"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A4.1_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A4.1_T2.js new file mode 100644 index 000000000..a7d7cb758 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * Multi line comment can contain HORIZONTAL TAB (U+0009) + * + * @path ch07/7.2/S7.2_A4.1_T2.js + * @description Use real HORIZONTAL TAB + */ + +/*CHECK#1*/ +var x = 0; +/* multi line comment x = 1;*/ +if (x !== 0) { + $ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A4.2_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A4.2_T1.js new file mode 100644 index 000000000..a3361d47c --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A4.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 VERTICAL TAB (U+000B) + * + * @path ch07/7.2/S7.2_A4.2_T1.js + * @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) { + $ERROR('#1: var x = 0; eval("/*\\u000B multi line \\u000B comment \\u000B x = 1;*/"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A4.2_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A4.2_T2.js new file mode 100644 index 000000000..87ef32235 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * Multi line comment can contain VERTICAL TAB (U+000B) + * + * @path ch07/7.2/S7.2_A4.2_T2.js + * @description Use real VERTICAL TAB + */ + +/*CHECK#1*/ +var x = 0; +/*multilinecommentx = 1;*/ +if (x !== 0) { + $ERROR('#1: var x = 0; /*multilinecommentx = 1;*/ x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A4.3_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A4.3_T1.js new file mode 100644 index 000000000..689d28790 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A4.3_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 FORM FEED (U+000C) + * + * @path ch07/7.2/S7.2_A4.3_T1.js + * @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) { + $ERROR('#1: var x = 0; eval("/*\\u000C multi line \\u000C comment \\u000C x = 1;*/"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A4.3_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A4.3_T2.js new file mode 100644 index 000000000..f6f404372 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * Multi line comment can contain FORM FEED (U+000C) + * + * @path ch07/7.2/S7.2_A4.3_T2.js + * @description Use real FORM FEED + */ + +/*CHECK#1*/ +var x = 0; +/*multilinecommentx = 1;*/ +if (x !== 0) { + $ERROR('#1: var x = 0; /*multilinecommentx = 1;*/ x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A4.4_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A4.4_T1.js new file mode 100644 index 000000000..9f5908e17 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A4.4_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 SPACE (U+0020) + * + * @path ch07/7.2/S7.2_A4.4_T1.js + * @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) { + $ERROR('#1: var x = 0; eval("/*\\u0020 multi line \\u0020 comment \\u0020 x = 1;*/"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A4.4_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A4.4_T2.js new file mode 100644 index 000000000..ce446861e --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * Multi line comment can contain SPACE (U+0020) + * + * @path ch07/7.2/S7.2_A4.4_T2.js + * @description Use real SPACE + */ + +/*CHECK#1*/ +var x = 0; +/* multi line comment x = 1;*/ +if (x !== 0) { + $ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A4.5_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A4.5_T1.js new file mode 100644 index 000000000..cef5216e3 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A4.5_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 NO-BREAK SPACE (U+00A0) + * + * @path ch07/7.2/S7.2_A4.5_T1.js + * @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) { + $ERROR('#1: var x = 0; eval("/*\\u00A0 multi line \\u00A0 comment \\u00A0 x = 1;*/"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A4.5_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A4.5_T2.js new file mode 100644 index 000000000..c4457c432 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/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. + +/** + * Multi line comment can contain NO-BREAK SPACE (U+00A0) + * + * @path ch07/7.2/S7.2_A4.5_T2.js + * @description Use real NO-BREAK SPACE + */ + +/*CHECK#1*/ +var x = 0; +/* multi line comment x = 1;*/ +if (x !== 0) { + $ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A5_T1.js b/js/src/tests/test262/ch07/7.2/S7.2_A5_T1.js new file mode 100644 index 000000000..6fb19c55d --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A5_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. + +/** + * White space cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits + * + * @path ch07/7.2/S7.2_A5_T1.js + * @description Use TAB (U+0009) + * @negative + */ + +var\u0009x; + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A5_T2.js b/js/src/tests/test262/ch07/7.2/S7.2_A5_T2.js new file mode 100644 index 000000000..1036b4ffa --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A5_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. + +/** + * White space cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits + * + * @path ch07/7.2/S7.2_A5_T2.js + * @description Use VERTICAL TAB (U+000B) + * @negative + */ + +var\u000Bx; + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A5_T3.js b/js/src/tests/test262/ch07/7.2/S7.2_A5_T3.js new file mode 100644 index 000000000..4eb8212cd --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A5_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. + +/** + * White space cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits + * + * @path ch07/7.2/S7.2_A5_T3.js + * @description Use FORM FEED (U+000C) + * @negative + */ + +var\u000Cx; + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A5_T4.js b/js/src/tests/test262/ch07/7.2/S7.2_A5_T4.js new file mode 100644 index 000000000..9a47a618d --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A5_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. + +/** + * White space cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits + * + * @path ch07/7.2/S7.2_A5_T4.js + * @description Use SPACE (U+0020) + * @negative + */ + +var\u0020x; + diff --git a/js/src/tests/test262/ch07/7.2/S7.2_A5_T5.js b/js/src/tests/test262/ch07/7.2/S7.2_A5_T5.js new file mode 100644 index 000000000..5076c3b24 --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/S7.2_A5_T5.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. + +/** + * White space cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits + * + * @path ch07/7.2/S7.2_A5_T5.js + * @description Use NO-BREAK SPACE (U+00A0) + * @negative + */ + +var\u00A0x; + diff --git a/js/src/tests/test262/ch07/7.2/browser.js b/js/src/tests/test262/ch07/7.2/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/browser.js diff --git a/js/src/tests/test262/ch07/7.2/shell.js b/js/src/tests/test262/ch07/7.2/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch07/7.2/shell.js |