OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --harmony-unicode-regexps | 5 // Flags: --harmony-unicode-regexps |
6 | 6 |
7 // Non-unicode use toUpperCase mappings. | 7 // Non-unicode use toUpperCase mappings. |
8 assertFalse(/[\u00e5]/i.test("\u212b")); | 8 assertFalse(/[\u00e5]/i.test("\u212b")); |
9 assertFalse(/[\u212b]/i.test("\u00e5\u1234")); | 9 assertFalse(/[\u212b]/i.test("\u00e5\u1234")); |
10 assertFalse(/[\u212b]/i.test("\u00e5")); | 10 assertFalse(/[\u212b]/i.test("\u00e5")); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 assertTrue(/\u1f8d/ui.test("\u1f85")); | 45 assertTrue(/\u1f8d/ui.test("\u1f85")); |
46 | 46 |
47 // Common mappings work. | 47 // Common mappings work. |
48 assertTrue(/\u1f6b/ui.test("\u1f63")); | 48 assertTrue(/\u1f6b/ui.test("\u1f63")); |
49 | 49 |
50 // Back references. | 50 // Back references. |
51 assertEquals(["\u00e5\u212b\u00c5", "\u00e5"], | 51 assertEquals(["\u00e5\u212b\u00c5", "\u00e5"], |
52 /(.)\1\1/ui.exec("\u00e5\u212b\u00c5")); | 52 /(.)\1\1/ui.exec("\u00e5\u212b\u00c5")); |
53 assertEquals(["\u{118aa}\u{118ca}", "\u{118aa}"], | 53 assertEquals(["\u{118aa}\u{118ca}", "\u{118aa}"], |
54 /(.)\1/ui.exec("\u{118aa}\u{118ca}")); | 54 /(.)\1/ui.exec("\u{118aa}\u{118ca}")); |
| 55 |
| 56 // Misc. |
| 57 assertTrue(/\u00e5\u00e5\u00e5/ui.test("\u212b\u00e5\u00c5")); |
| 58 assertTrue(/AB\u{10400}/ui.test("ab\u{10428}")); |
OLD | NEW |