Skip to content

Commit be0f526

Browse files
committed
Ignore line endings in indexer tests (fixes #207)
Change-Id: I3a204c9b6b3908a3a2395a13eea9890c0943ee88
1 parent bd4aa47 commit be0f526

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

Changes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
0.64.1 2025-05-26
2+
- [bugfix] Ignore line endings in indexer tests. (diewald)
3+
14
0.64.0 2025-04-30
25
- [feature] Support signed matchids to prevent consecutive
36
positional requests (diewald)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
<groupId>de.ids-mannheim.korap.krill</groupId>
3737
<artifactId>Krill</artifactId>
38-
<version>0.64.0</version>
38+
<version>0.64.1</version>
3939
<packaging>jar</packaging>
4040

4141
<name>Krill</name>

src/test/java/de/ids_mannheim/korap/TestIndexer.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package de.ids_mannheim.korap;
22

33
import static org.junit.Assert.assertEquals;
4+
import static org.junit.Assert.assertTrue;
45

56
import java.io.ByteArrayOutputStream;
67
import java.io.File;
@@ -33,21 +34,21 @@ public class TestIndexer {
3334
public void testArguments () throws IOException {
3435
Indexer.main(new String[] { "-c", "src/test/resources/krill.properties",
3536
"-i", "src/test/resources/bzk"});
36-
assertEquals("Added or updated 1 file.\n", outputStream.toString());
37+
assertTrue(outputStream.toString().startsWith("Added or updated 1 file."));
3738
}
3839

3940
@Test
4041
public void testOutputArgument () throws IOException {
4142
Indexer.main(new String[] { "-c", "src/test/resources/krill.properties",
4243
"-i", "src/test/resources/bzk", "-o", "test-output"});
43-
assertEquals("Added or updated 1 file.\n", outputStream.toString());
44+
assertTrue(outputStream.toString().startsWith("Added or updated 1 file."));
4445
}
4546

4647
@Test
4748
public void testMultipleInputFiles () throws IOException {
4849
Indexer.main(new String[] { "-c", "src/test/resources/krill.properties",
4950
"-i", "src/test/resources/wiki"});
50-
assertEquals("Added or updated 19 files.\n", outputStream.toString());
51+
assertTrue(outputStream.toString().startsWith("Added or updated 19 files."));
5152
}
5253

5354

@@ -58,7 +59,7 @@ public void testAdding () throws IOException {
5859
"-i", "src/test/resources/bzk",
5960
"-a"});
6061
logger.info(outputStream.toString());
61-
assertEquals(outputStream.toString(), "Added 1 file.\n");
62+
assertTrue(outputStream.toString().startsWith("Added 1 file."));
6263
}
6364

6465

@@ -68,7 +69,7 @@ public void testMultipleInputDirectories () throws IOException {
6869
"-i",
6970
"src/test/resources/bzk;src/test/resources/goe;src/test/resources/sgbr",
7071
"-o", "test-index"});
71-
assertEquals("Added or updated 5 files.\n", outputStream.toString());
72+
assertTrue(outputStream.toString().startsWith("Added or updated 5 files."));
7273
}
7374

7475
@Test
@@ -103,7 +104,7 @@ public void testUnicodeProblem () throws IOException {
103104
"-o", "test-index2"
104105
});
105106
logger.info(outputStream.toString());
106-
assertEquals(outputStream.toString(), "Added 1 file.\n");
107+
assertTrue(outputStream.toString().startsWith("Added 1 file."));
107108
}
108109

109110
@Test
@@ -119,7 +120,7 @@ public void testMaxTextSize () throws IOException {
119120

120121
Indexer.main(new String[] { "-c", tempPropertiesFile.getAbsolutePath(),
121122
"-i", "src/test/resources/bzk", "-o", "test-output-1"});
122-
assertEquals("Added or updated 1 file.\n", outputStream.toString());
123+
assertTrue(outputStream.toString().startsWith("Added or updated 1 file."));
123124

124125
tempPropertiesFile.delete();
125126
}

0 commit comments

Comments
 (0)