mirror of https://github.com/tc39/test262.git
Fix test involving a Unicode property escape in a character class range (#1034)
Thanks to @anba for spotting this: 4843f049fa (r116528031)
This commit is contained in:
parent
a9fa392c11
commit
d587abccdb
|
@ -10,9 +10,11 @@ features: [regexp-unicode-property-escapes]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
/[\p{Hex}]/u;
|
/[\p{Hex}]/u;
|
||||||
assert(
|
assert.throws(
|
||||||
/[\p{Hex}-\uFFFF]/u.test('-'),
|
SyntaxError,
|
||||||
'property escape in character class should not be parsed as the start of a range'
|
() => /[\p{Hex}-\uFFFF]/u,
|
||||||
|
// See step 1 of https://tc39.github.io/ecma262/#sec-runtime-semantics-characterrange-abstract-operation.
|
||||||
|
'property escape at start of character class range should throw if it expands to multiple characters'
|
||||||
);
|
);
|
||||||
assert.throws.early(SyntaxError, "/[\\p{}]/u");
|
assert.throws.early(SyntaxError, "/[\\p{}]/u");
|
||||||
assert.throws.early(SyntaxError, "/[\\p{invalid}]/u");
|
assert.throws.early(SyntaxError, "/[\\p{invalid}]/u");
|
||||||
|
|
Loading…
Reference in New Issue