| 1 |
// Copyright 2017 Mathias Bynens. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
author: Mathias Bynens |
| 6 |
description: > |
| 7 |
Binary properties with an explicit value must throw in Unicode property |
| 8 |
escapes (even if the value is valid). |
| 9 |
esid: sec-static-semantics-unicodematchproperty-p |
| 10 |
features: [regexp-unicode-property-escapes] |
| 11 |
---*/ |
| 12 |
|
| 13 |
assert.throws.early(SyntaxError, "/\\p{ASCII=Yes}/u"); |
| 14 |
assert.throws.early(SyntaxError, "/\\p{ASCII=Y}/u"); |
| 15 |
assert.throws.early(SyntaxError, "/\\p{ASCII=T}/u"); |
| 16 |
|
| 17 |
assert.throws.early(SyntaxError, "/\\P{ASCII=No}/u"); |
| 18 |
assert.throws.early(SyntaxError, "/\\P{ASCII=N}/u"); |
| 19 |
assert.throws.early(SyntaxError, "/\\P{ASCII=F}/u"); |
| 20 |
|
| 21 |
assert.throws.early(SyntaxError, "/\\p{ASCII=Invalid}/u"); |