| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 // Dart test for testing regular expressions in Dart. | |
| 5 | |
| 6 // These tests currently fail due to bug 6592. | |
| 7 main() { | |
| 8 String str = "\u{10000}"; | |
| 9 | |
| 10 // Dot should match a surrogate pair. | |
| 11 Expect.isTrue(new RegExp(r'^.$').hasMatch(str)); | |
| 12 | |
| 13 // Non-BMP characters in character classes should be treated as one character, | |
| 14 // not two separate surrogates. | |
| 15 String alias = "\u{10402}"; // 0xd801 0xdc02. | |
| 16 String char_class = "\u{10401}\u{10802}"; // 0xd801 0xdc01 0xd802 0xdc02. | |
| 17 Expect.isFalse(new RegExp('^[$char_class]+\$').hasMatch(alias)); | |
| 18 } | |
| OLD | NEW |