| 1 |
// Copyright (C) 2015 André Bargull. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
description: B.1.4 is not applied for Unicode RegExp - Standalone brackets |
| 6 |
info: | |
| 7 |
The compatibility extensions defined in B.1.4 Regular Expressions Patterns |
| 8 |
are not applied for Unicode RegExp. |
| 9 |
Tested extension: "Atom[U] :: PatternCharacter" |
| 10 |
es6id: 21.1.2 |
| 11 |
---*/ |
| 12 |
|
| 13 |
// Single parentheses and brackets. |
| 14 |
assert.throws(SyntaxError, function() { |
| 15 |
RegExp("(", "u"); |
| 16 |
}, 'RegExp("(", "u"): '); |
| 17 |
assert.throws(SyntaxError, function() { |
| 18 |
RegExp(")", "u"); |
| 19 |
}, 'RegExp(")", "u"): '); |
| 20 |
assert.throws(SyntaxError, function() { |
| 21 |
RegExp("[", "u"); |
| 22 |
}, 'RegExp("[", "u"): '); |
| 23 |
assert.throws(SyntaxError, function() { |
| 24 |
RegExp("]", "u"); |
| 25 |
}, 'RegExp("]", "u"): '); |
| 26 |
assert.throws(SyntaxError, function() { |
| 27 |
RegExp("{", "u"); |
| 28 |
}, 'RegExp("{", "u"): '); |
| 29 |
assert.throws(SyntaxError, function() { |
| 30 |
RegExp("}", "u"); |
| 31 |
}, 'RegExp("}", "u"): '); |