Skip to content
Snippets Groups Projects
Commit ffec41b7 authored by André Bargull's avatar André Bargull
Browse files

Improve compatibility for engines without support for Annex B

parent 03d2f68c
Branches
No related tags found
No related merge requests found
Showing
with 102 additions and 2 deletions
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
/*--- /*---
info: "CharacterEscape :: c ControlLetter" info: "CharacterEscape :: c ControlLetter"
es5id: 15.10.2.10_A2.1_T3 es5id: 15.10.2.10_A2.1_T3
es6id: B.1.4
description: "ControlLetter :: RUSSIAN ALPHABET is incorrect" description: "ControlLetter :: RUSSIAN ALPHABET is incorrect"
---*/ ---*/
......
...@@ -7,6 +7,7 @@ info: > ...@@ -7,6 +7,7 @@ info: >
evaluates by evaluating ClassRanges to obtain a CharSet and returning evaluates by evaluating ClassRanges to obtain a CharSet and returning
that CharSet and the boolean false that CharSet and the boolean false
es5id: 15.10.2.13_A1_T16 es5id: 15.10.2.13_A1_T16
es6id: B.1.4
description: > description: >
Execute /[\d][\12-\14]{1,}[^\d]/.exec("line1\n\n\n\n\nline2") and Execute /[\d][\12-\14]{1,}[^\d]/.exec("line1\n\n\n\n\nline2") and
check results check results
......
...@@ -7,6 +7,7 @@ info: > ...@@ -7,6 +7,7 @@ info: >
matches the result of the nth set of capturing parentheses (see matches the result of the nth set of capturing parentheses (see
15.10.2.11) 15.10.2.11)
es5id: 15.10.2.9_A1_T4 es5id: 15.10.2.9_A1_T4
es6id: B.1.4
description: > description: >
Execute /\b(\w+) \2\b/.test("do you listen the the band") and Execute /\b(\w+) \2\b/.test("do you listen the the band") and
check results check results
......
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
RegularExpressionFirstChar :: BackslashSequence :: \NonTerminator,
RegularExpressionChars :: [empty], RegularExpressionFlags :: [empty]
es5id: 7.8.5_A1.4_T2
es6id: 11.8.5
description: Complex test with eval, using syntax pattern
---*/
for (var cu = 0; cu <= 0xffff; ++cu) {
var Elimination =
((cu === 0x002A) || (cu === 0x002F) || (cu === 0x005C) || (cu === 0x002B) ||
(cu === 0x003F) || (cu === 0x0028) || (cu === 0x0029) ||
(cu === 0x005B) || (cu === 0x005D) || (cu === 0x007B) || (cu === 0x007D));
/*
* \u002A / \u002F \ \u005C + \u002B
? \u003F ( \u0028 ) \u0029
[ \u005B ] \u005D { \u007B } \u007D
*/
var LineTerminator = ((cu === 0x000A) || (cu === 0x000D) || (cu === 0x2028) || (cu === 0x2029));
if ((Elimination || LineTerminator ) === false) {
var xx = "\\" + String.fromCharCode(cu);
var pattern = eval("/" + xx + "/");
assert.sameValue(pattern.source, xx, "Code unit: " + cu.toString(16));
}
}
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
RegularExpressionFirstChar :: BackslashSequence :: \NonTerminator,
RegularExpressionChars :: [empty], RegularExpressionFlags :: [empty]
es5id: 7.8.5_A1.4_T1
es6id: 11.8.5
description: Check similar to (/\1/.source === "\\1")
---*/
assert.sameValue(/\1/.source, "\\1");
assert.sameValue(/\a/.source, "\\a");
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
RegularExpressionChar :: BackslashSequence :: \NonTerminator,
RegularExpressionFlags :: [empty]
es5id: 7.8.5_A2.4_T2
es6id: 11.8.5
description: Complex test with eval, using syntax pattern
---*/
for (var cu = 0; cu <= 0xffff; ++cu) {
var Elimination =
((cu === 0x002A) || (cu === 0x002F) || (cu === 0x005C) || (cu === 0x002B) ||
(cu === 0x003F) || (cu === 0x0028) || (cu === 0x0029) ||
(cu === 0x005B) || (cu === 0x005D) || (cu === 0x007B) || (cu === 0x007D));
/*
* \u002A / \u002F \ \u005C + \u002B
? \u003F ( \u0028 ) \u0029
[ \u005B ] \u005D { \u007B } \u007D
*/
var LineTerminator = ((cu === 0x000A) || (cu === 0x000D) || (cu === 0x2028) || (cu === 0x2029));
if ((Elimination || LineTerminator ) === false) {
var xx = "a\\" + String.fromCharCode(cu);
var pattern = eval("/" + xx + "/");
assert.sameValue(pattern.source, xx, "Code unit: " + cu.toString(16));
}
}
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
RegularExpressionChar :: BackslashSequence :: \NonTerminator,
RegularExpressionFlags :: [empty]
es5id: 7.8.5_A2.4_T1
es6id: 11.8.5
description: Check similar to (/a\1/.source === "a\\1")
---*/
assert.sameValue(/a\1/.source, "a\\1");
assert.sameValue(/a\a/.source, "a\\a");
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
/*--- /*---
es5id: 12.14-2 es5id: 12.14-2
es6id: B.3.5
description: > description: >
catch doesn't change declaration scope - var initializer in catch catch doesn't change declaration scope - var initializer in catch
with same name as catch parameter changes parameter with same name as catch parameter changes parameter
features: [AnnexB]
---*/ ---*/
function capturedFoo() {return foo}; function capturedFoo() {return foo};
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
/*--- /*---
es5id: 12.14-1 es5id: 12.14-1
es6id: B.3.5
description: > description: >
catch doesn't change declaration scope - var initializer in catch catch doesn't change declaration scope - var initializer in catch
with same name as catch parameter changes parameter with same name as catch parameter changes parameter
features: [AnnexB]
---*/ ---*/
foo = "prior to throw"; foo = "prior to throw";
......
...@@ -7,6 +7,7 @@ description: > ...@@ -7,6 +7,7 @@ description: >
Strict mode - checking access to non-strict function caller from Strict mode - checking access to non-strict function caller from
non-strict function (eval includes strict directive prologue) non-strict function (eval includes strict directive prologue)
flags: [noStrict] flags: [noStrict]
features: [caller]
---*/ ---*/
eval("\"use strict\";\ngNonStrict();"); eval("\"use strict\";\ngNonStrict();");
......
...@@ -8,6 +8,7 @@ description: > ...@@ -8,6 +8,7 @@ description: >
non-strict function (indirect eval includes strict directive non-strict function (indirect eval includes strict directive
prologue) prologue)
flags: [noStrict] flags: [noStrict]
features: [caller]
---*/ ---*/
var my_eval = eval; var my_eval = eval;
......
...@@ -8,6 +8,7 @@ description: > ...@@ -8,6 +8,7 @@ description: >
non-strict function (non-strict function declaration called by non-strict function (non-strict function declaration called by
strict function declaration) strict function declaration)
flags: [noStrict] flags: [noStrict]
features: [caller]
---*/ ---*/
function f() { return gNonStrict();}; function f() { return gNonStrict();};
......
...@@ -8,6 +8,7 @@ description: > ...@@ -8,6 +8,7 @@ description: >
non-strict function (non-strict function declaration called by non-strict function (non-strict function declaration called by
strict eval) strict eval)
flags: [noStrict] flags: [noStrict]
features: [caller]
---*/ ---*/
function f() { return gNonStrict();}; function f() { return gNonStrict();};
......
...@@ -8,6 +8,7 @@ description: > ...@@ -8,6 +8,7 @@ description: >
non-strict function (non-strict function declaration called by non-strict function (non-strict function declaration called by
strict Function constructor) strict Function constructor)
flags: [noStrict] flags: [noStrict]
features: [caller]
---*/ ---*/
function f() {return gNonStrict();}; function f() {return gNonStrict();};
......
...@@ -8,6 +8,7 @@ description: > ...@@ -8,6 +8,7 @@ description: >
non-strict function (non-strict function declaration called by non-strict function (non-strict function declaration called by
strict new'ed Function constructor) strict new'ed Function constructor)
flags: [noStrict] flags: [noStrict]
features: [caller]
---*/ ---*/
function f() { return gNonStrict();}; function f() { return gNonStrict();};
......
...@@ -8,6 +8,7 @@ description: > ...@@ -8,6 +8,7 @@ description: >
non-strict function (non-strict function declaration called by non-strict function (non-strict function declaration called by
strict Function.prototype.apply()) strict Function.prototype.apply())
flags: [noStrict] flags: [noStrict]
features: [caller]
---*/ ---*/
function f() { return gNonStrict();}; function f() { return gNonStrict();};
......
...@@ -8,6 +8,7 @@ description: > ...@@ -8,6 +8,7 @@ description: >
non-strict function (non-strict function declaration called by non-strict function (non-strict function declaration called by
strict Function.prototype.apply(null)) strict Function.prototype.apply(null))
flags: [noStrict] flags: [noStrict]
features: [caller]
---*/ ---*/
function f() { return gNonStrict();}; function f() { return gNonStrict();};
......
...@@ -8,6 +8,7 @@ description: > ...@@ -8,6 +8,7 @@ description: >
non-strict function (non-strict function declaration called by non-strict function (non-strict function declaration called by
strict Function.prototype.apply(undefined)) strict Function.prototype.apply(undefined))
flags: [noStrict] flags: [noStrict]
features: [caller]
---*/ ---*/
function f() { return gNonStrict();}; function f() { return gNonStrict();};
......
...@@ -8,6 +8,7 @@ description: > ...@@ -8,6 +8,7 @@ description: >
non-strict function (non-strict function declaration called by non-strict function (non-strict function declaration called by
strict Function.prototype.apply(someObject)) strict Function.prototype.apply(someObject))
flags: [noStrict] flags: [noStrict]
features: [caller]
---*/ ---*/
function f() { return gNonStrict();}; function f() { return gNonStrict();};
......
...@@ -8,6 +8,7 @@ description: > ...@@ -8,6 +8,7 @@ description: >
non-strict function (non-strict function declaration called by non-strict function (non-strict function declaration called by
strict Function.prototype.apply(globalObject)) strict Function.prototype.apply(globalObject))
flags: [noStrict] flags: [noStrict]
features: [caller]
includes: [fnGlobalObject.js] includes: [fnGlobalObject.js]
---*/ ---*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment