| 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 |
Properties not explicitly listed in the Unicode property escapes spec must |
| 8 |
not be supported. |
| 9 |
esid: sec-static-semantics-unicodematchproperty-p |
| 10 |
features: [regexp-unicode-property-escapes] |
| 11 |
---*/ |
| 12 |
|
| 13 |
// Non-existent binary properties must not be supported. |
| 14 |
assert.throws.early(SyntaxError, "/\\p{UnknownBinaryProperty}/u"); |
| 15 |
assert.throws.early(SyntaxError, "/\\P{UnknownBinaryProperty}/u"); |
| 16 |
|
| 17 |
// Unlisted properties must not be supported. |
| 18 |
assert.throws.early(SyntaxError, "/\\p{Line_Break}/u"); |
| 19 |
assert.throws.early(SyntaxError, "/\\P{Line_Break}/u"); |
| 20 |
assert.throws.early(SyntaxError, "/\\p{Line_Break=Alphabetic}/u"); |
| 21 |
assert.throws.early(SyntaxError, "/\\P{Line_Break=Alphabetic}/u"); |
| 22 |
assert.throws.early(SyntaxError, "/\\p{FC_NFKC_Closure}/u"); |
| 23 |
assert.throws.early(SyntaxError, "/\\P{FC_NFKC_Closure}/u"); |
| 24 |
assert.throws.early(SyntaxError, "/\\p{Block=Adlam}/u"); |