JAVA-5950 Reduce size of core-java-os.

This commit is contained in:
mikr 2021-08-18 12:35:08 +02:00
parent 5d69f00f86
commit a9ae125165
2 changed files with 19 additions and 6 deletions

View File

@ -25,9 +25,9 @@ public class GrepWithUnix4JIntegrationTest {
@Test
public void whenGrepWithSimpleString_thenCorrect() {
int expectedLineCount = 4;
int expectedLineCount = 5;
// grep "NINETEEN" dictionary.txt
// grep "NINETEEN" dictionary.in
List<Line> lines = Unix4j.grep("NINETEEN", fileToGrep).toLineList();
assertEquals(expectedLineCount, lines.size());
@ -35,9 +35,9 @@ public class GrepWithUnix4JIntegrationTest {
@Test
public void whenInverseGrepWithSimpleString_thenCorrect() {
int expectedLineCount = 178687;
int expectedLineCount = 8;
// grep -v "NINETEEN" dictionary.txt
// grep -v "NINETEEN" dictionary.in
List<Line> lines = grep(Options.v, "NINETEEN", fileToGrep).toLineList();
assertEquals(expectedLineCount, lines.size());
@ -45,9 +45,9 @@ public class GrepWithUnix4JIntegrationTest {
@Test
public void whenGrepWithRegex_thenCorrect() {
int expectedLineCount = 151;
int expectedLineCount = 5;
// grep -c ".*?NINE.*?" dictionary.txt
// grep -c ".*?NINE.*?" dictionary.in
String patternCount = grep(Options.c, ".*?NINE.*?", fileToGrep).cut(fields, ":", 1).toStringResult();
assertEquals(expectedLineCount, Integer.parseInt(patternCount));

View File

@ -0,0 +1,13 @@
EIGHTTEEN
EIGHTTEENS
EIGHTTEENTH
EIGHTTEENTHS
NINETEEN
NINETEENS
NINETEENTH
NINETEENTHS
TWENTY
TWENTHIES
TWENTHIETH
TWENTHIETHS
TWENTYNINETEEN