mirror of https://github.com/tc39/test262.git
fix missing/duplicate tests
This commit is contained in:
parent
e80d8a184a
commit
0160cab518
|
@ -23,6 +23,8 @@ assert(/(?<a\uD801\uDCA4>.)/u.test("a"), "\\u Lead \\u Trail");
|
|||
assert(/(?<\u0041>.)/u.test("a"), "\\u NonSurrogate");
|
||||
assert(/(?<\u{0041}>.)/u.test("a"), "\\u{ Non-surrogate }");
|
||||
assert(/(?<a\u{104A4}>.)/u.test("a"), "\\u{ Surrogate, ID_Continue }");
|
||||
assert(RegExp("(?<\u{0041}>.)", "u").test("a"), "Non-surrogate");
|
||||
assert(RegExp("(?<a\u{104A4}>.)", "u").test("a"), "Surrogate,ID_Continue");
|
||||
assert((/(?<\u{0041}>.)/u).test("a"), "Non-surrogate");
|
||||
assert(/(?<a\u{104A4}>.)/u.test("a"), "Surrogate, ID_Continue");
|
||||
assert(RegExp("(?<\\u0041>.)", "u").test("a"), "Non-surrogate");
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: Group reference must have corresponding group.
|
||||
info: |
|
||||
It is a Syntax Error if the enclosing Pattern does not contain a
|
||||
GroupSpecifier with an enclosed RegExpIdentifierName whose StringValue
|
||||
equals the StringValue of the RegExpIdentifierName of this production's
|
||||
GroupName.
|
||||
esid: sec-patterns-static-semantics-early-errors
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [regexp-named-groups]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
/\k<a>(?<b>x)/;
|
|
@ -0,0 +1,13 @@
|
|||
// Copyright 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: Lone surrogates in RegExp group names
|
||||
esid: prod-GroupSpecifier
|
||||
features: [regexp-named-groups]
|
||||
---*/
|
||||
|
||||
assert.throws(SyntaxError, () => eval("/(?<a\uD801>.)/"), "Lead");
|
||||
assert.throws(SyntaxError, () => eval("/(?<a\uDCA4>.)/"), "Trail");
|
||||
assert.throws(SyntaxError, () => eval("/(?<a\uD801>.)/u"), "Lead with u flag");
|
||||
assert.throws(SyntaxError, () => eval("/(?<a\uDCA4>.)/u"), "Trail with u flag");
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: GroupSpecifier must be identifier-like.
|
||||
esid: prod-GroupSpecifier
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
features: [regexp-named-groups]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
/(?<a\uDCA4>.)/;
|
|
@ -2,7 +2,7 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: GroupSpecifier must be identifier-like.
|
||||
description: \u{} escapes in GroupSpecifier allowed only in Unicode mode
|
||||
esid: prod-GroupSpecifier
|
||||
negative:
|
||||
phase: parse
|
||||
|
@ -12,4 +12,4 @@ features: [regexp-named-groups]
|
|||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
/(?<a\uD801>.)/;
|
||||
/(?<\u{03C0}>a)/;
|
|
@ -12,4 +12,4 @@ features: [regexp-named-groups]
|
|||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
/(?<\u{0041}>a)/;
|
||||
/(?<\u{0041}>.)/;
|
||||
|
|
Loading…
Reference in New Issue