| 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 |
Non-binary properties without a value must throw in Unicode property escapes. |
| 8 |
esid: sec-static-semantics-unicodematchproperty-p |
| 9 |
features: [regexp-unicode-property-escapes] |
| 10 |
---*/ |
| 11 |
|
| 12 |
assert.throws.early(SyntaxError, "/\\p{General_Category}/u"); |
| 13 |
assert.throws.early(SyntaxError, "/\\P{General_Category}/u"); |
| 14 |
assert.throws.early(SyntaxError, "/\\p{General_Category=}/u"); |
| 15 |
assert.throws.early(SyntaxError, "/\\P{General_Category=}/u"); |
| 16 |
assert.throws.early(SyntaxError, "/\\p{Script}/u"); |
| 17 |
assert.throws.early(SyntaxError, "/\\P{Script}/u"); |
| 18 |
assert.throws.early(SyntaxError, "/\\p{Script=}/u"); |
| 19 |
assert.throws.early(SyntaxError, "/\\P{Script=}/u"); |
| 20 |
assert.throws.early(SyntaxError, "/\\p{Script_Extensions}/u"); |
| 21 |
assert.throws.early(SyntaxError, "/\\P{Script_Extensions}/u"); |
| 22 |
assert.throws.early(SyntaxError, "/\\p{Script_Extensions=}/u"); |
| 23 |
assert.throws.early(SyntaxError, "/\\P{Script_Extensions=}/u"); |