mirror of https://github.com/tc39/test262.git
add empty references tests
This commit is contained in:
parent
c38f1d12b0
commit
cb22dad417
|
@ -23,6 +23,7 @@ assert(/\k<a/.test("k<a"));
|
|||
assert(/\k/.test("k"));
|
||||
assert.throws(SyntaxError, () => eval("/(?<a>.)\\k/"));
|
||||
assert.throws(SyntaxError, () => eval("/(?<a>.)\\k<a/"));
|
||||
assert.throws(SyntaxError, () => eval("/(?<a>.)\\k<>/"));
|
||||
assert.throws(SyntaxError, () => eval("/(?<a>.)\\k<b>/"));
|
||||
assert.throws(SyntaxError, () => eval("/(?<a>a)\\k<ab>/"));
|
||||
assert.throws(SyntaxError, () => eval("/(?<ab>a)\\k<a>/"));
|
||||
|
|
|
@ -16,9 +16,11 @@ assert.throws(SyntaxError, () => eval("/(?<a>a)(?<a>a)/u"), "Duplicate name");
|
|||
assert.throws(SyntaxError, () => eval("/(?<a>a)(?<b>b)(?<a>a)/u"), "Duplicate name");
|
||||
assert.throws(SyntaxError, () => eval("/\\k<a>/u"), "Invalid reference");
|
||||
assert.throws(SyntaxError, () => eval("/\\k<a/u"), "Unterminated reference");
|
||||
assert.throws(SyntaxError, () => eval("/\\k<>/u"), "Empty reference");
|
||||
assert.throws(SyntaxError, () => eval("/\\k/u"), "Lone \k");
|
||||
assert.throws(SyntaxError, () => eval("/(?<a>.)\\k/u"), "Lone \k");
|
||||
assert.throws(SyntaxError, () => eval("/(?<a>.)\\k<a/u"), "Unterminated reference");
|
||||
assert.throws(SyntaxError, () => eval("/(?<a>.)\\k<>/u"), "Empty reference");
|
||||
assert.throws(SyntaxError, () => eval("/(?<a>.)\\k<b>/u"), "Invalid reference");
|
||||
assert.throws(SyntaxError, () => eval("/(?<a>a)\\k<ab>/u"), "Invalid reference");
|
||||
assert.throws(SyntaxError, () => eval("/(?<ab>a)\\k<a>/u"), "Invalid reference");
|
||||
|
|
Loading…
Reference in New Issue