18
18
*/
19
19
20
20
/*
21
- * Copyright (c) 2008, 2021 , Oracle and/or its affiliates. All rights reserved.
21
+ * Copyright (c) 2008, 2022 , Oracle and/or its affiliates. All rights reserved.
22
22
*/
23
23
package org .opengrok .indexer .history ;
24
24
36
36
*
37
37
* @author austvik
38
38
*/
39
- public class CVSHistoryParserTest {
39
+ class CVSHistoryParserTest {
40
40
41
41
CVSHistoryParser instance ;
42
42
@@ -55,19 +55,17 @@ public void tearDown() {
55
55
* @throws Exception exception
56
56
*/
57
57
@ Test
58
- public void parseEmpty () throws Exception {
58
+ void parseEmpty () throws Exception {
59
59
History result = instance .parse ("" );
60
60
assertNotNull (result );
61
61
assertEquals (0 , result .getHistoryEntries ().size (), "Should not contain any history entries" );
62
62
}
63
63
64
64
/**
65
65
* Parse something that could come out from the W3C public CVS repository.
66
- *
67
- * @throws java.lang.Exception
68
66
*/
69
67
@ Test
70
- public void parseALaW3C () throws Exception {
68
+ void parseALaW3C () throws Exception {
71
69
String revId1 = "1.2" ;
72
70
String revId2 = "1.2.4.5" ;
73
71
String revId3 = "1.134" ;
@@ -104,7 +102,8 @@ public void parseALaW3C() throws Exception {
104
102
"date: " + date1 + "; author: " + author1 +
105
103
"; state: Exp; lines: +6 -2;\n " +
106
104
"some comment that is\n " +
107
- "spanning two lines\n " +
105
+ "--------\n " +
106
+ "spanning multiple lines\n " +
108
107
"==========================================================" +
109
108
"===================\n " ;
110
109
History result = instance .parse (output );
@@ -123,7 +122,7 @@ public void parseALaW3C() throws Exception {
123
122
assertEquals (author1 , e2 .getAuthor ());
124
123
assertEquals (0 , e2 .getFiles ().size ());
125
124
assertTrue (e2 .getMessage ().contains ("some" ), "Should contain comment of both lines: line 1" );
126
- assertTrue (e2 .getMessage ().contains ("two " ), "Should contain comment of both lines: line 2" );
125
+ assertTrue (e2 .getMessage ().contains ("multiple " ), "Should contain comment of both lines: line 2" );
127
126
128
127
assertEquals (Map .of (revId2 , tag1 ), result .getTags ());
129
128
}
0 commit comments