test/java/util/regex/RegExTest.java
Print this page
*** 33,42 ****
--- 33,43 ----
* 6350801 6676425 6878475 6919132 6931676 6948903 6990617 7014645 7039066
* 7067045 7014640 7189363 8007395 8013252 8013254 8012646 8023647 6559590
* 8027645 8035076 8039124 8035975 8074678 6854417 8143854 8147531 7071819
* 8151481 4867170 7080302 6728861 6995635 6736245 4916384
* 6328855 6192895 6345469 6988218 6693451 7006761 8140212 8143282 8158482
+ * 8176029
*
* @library /lib/testlibrary
* @build jdk.testlibrary.*
* @run main RegExTest
* @key randomness
*** 4565,4578 ****
private static void linebreakTest() throws Exception {
String linebreaks = new String (new char[] {
0x0A, 0x0B, 0x0C, 0x0D, 0x85, 0x2028, 0x2029 });
String crnl = "\r\n";
! if (!Pattern.compile("\\R+").matcher(linebreaks).matches() ||
! !Pattern.compile("\\R").matcher(crnl).matches() ||
! Pattern.compile("\\R\\R").matcher(crnl).matches())
failCount++;
report("linebreakTest");
}
// #7189363
private static void branchTest() throws Exception {
--- 4566,4584 ----
private static void linebreakTest() throws Exception {
String linebreaks = new String (new char[] {
0x0A, 0x0B, 0x0C, 0x0D, 0x85, 0x2028, 0x2029 });
String crnl = "\r\n";
! if (!(Pattern.compile("\\R+").matcher(linebreaks).matches() &&
! Pattern.compile("\\R").matcher(crnl).matches() &&
! Pattern.compile("\\Rabc").matcher(crnl + "abc").matches() &&
! Pattern.compile("\\Rabc").matcher("\rabc").matches() &&
! Pattern.compile("\\R\\R").matcher(crnl).matches() && // backtracking
! Pattern.compile("\\R\\n").matcher(crnl).matches()) && // backtracking
! !Pattern.compile("((?<!\\R)\\s)*").matcher(crnl).matches()) { // #8176029
failCount++;
+ }
report("linebreakTest");
}
// #7189363
private static void branchTest() throws Exception {