tests/auto/qml/ecmascripttests/test262/test/built-ins/RegExp/property-escapes/non-existent-property-values.js
raw symbols SCIP| 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-existent property values must not be supported in Unicode property |
| 8 | escapes. |
| 9 | esid: sec-static-semantics-unicodematchproperty-p |
| 10 | features: [regexp-unicode-property-escapes] |
| 11 | ---*/ |
| 12 | |
| 13 | assert.throws.early(SyntaxError, "/\\p{General_Category=WAT}/u"); |
| 14 | assert.throws.early(SyntaxError, "/\\P{Line_Breakz=WAT}/u"); |
| 15 | |
| 16 | assert.throws.early(SyntaxError, "/\\p{Script=FooBarBazInvalid}/u"); |
| 17 | assert.throws.early(SyntaxError, "/\\P{Script=FooBarBazInvalid}/u"); |
| 18 | |
| 19 | assert.throws.early(SyntaxError, "/\\p{Script_Extensions=H_e_h}/u"); |
| 20 | assert.throws.early(SyntaxError, "/\\P{Script_Extensions=H_e_h}/u"); |