| | | 1 | void testParagraphCharacter() throws IOException {↵
|
| | | 2 | reg.setPattern("end of text$");↵
|
| | | 3 | assertTrue("paragraph character", !reg.matches("end of text\u2029"));↵
|
| | | 4 | }↵
|
|
1 | void testLineSeparatorCharacter() throws IOException {↵ | | 5 | public void testLineSeparatorCharacter() throws IOException {↵
|
2 | reg.setPattern("end of text$");↵ | | 6 | reg.setPattern("end of text$");↵
|
3 | assertTrue("line-separator character", !reg.matches("end of text\u2028"));↵ | | 7 | assertTrue("line-separator character", !reg.matches("end of text\u2028"));↵
|
4 | }↵ | | 8 | }↵
|
|
5 | public void testNextLineCharacter() throws IOException {↵ | | 9 | public void testNextLineCharacter() throws IOException {↵
|
6 | reg.setPattern("end of text$");↵ | | 10 | reg.setPattern("end of text$");↵
|
7 | assertTrue("next-line character", !reg.matches("end of text\u0085"));↵ | | 11 | assertTrue("next-line character", !reg.matches("end of text\u0085"));↵
|
8 | }↵ | | 12 | }↵
|
|
9 | public void testStandaloneCR() throws IOException {↵ | | 13 | public void testStandaloneCR() throws IOException {↵
|
10 | reg.setPattern("end of text$");↵ | | 14 | reg.setPattern("end of text$");↵
|
11 | assertTrue("standalone CR", !reg.matches("end of text\r"));↵ | | 15 | assertTrue("standalone CR", !reg.matches("end of text\r"));↵
|
12 | }↵ | | 16 |
|
|
13 | public void testWindowsLineSeparator() throws IOException {↵ | | | |
14 | reg.setPattern("end of text$");↵ | | | |
15 | assertTrue("Windows line separator", !reg.matches("end of text\r\n"));↵ | | | |
16 | | | | |