Skip to content

Commit 3de9aaf

Browse files
authored
fix: prevent trimming so that wc -l is consistent (#6)
1 parent 6b374eb commit 3de9aaf

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

src/main/java/io/github/algomaster99/maven_module_graph/Utility.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static void printToFile(MavenModule root, Path plainText, int indent) {
4242

4343
// Write to file
4444
try {
45-
Files.writeString(plainText, sb.toString().trim());
45+
Files.writeString(plainText, sb.toString());
4646
} catch (IOException e) {
4747
e.printStackTrace();
4848
}

src/test/java/io/github/algomaster99/maven_module_graph/MavenModuleTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ void neo4j_profileModules(@TempDir Path temp) throws XmlPullParserException, IOE
4747
Utility.printToJson(module, actualJson, 0);
4848

4949
// assert
50-
// wc gives 124 as output because it does not count the last line without \n
5150
assertThat(Files.readAllLines(expectedPlainText).size(), equalTo(125));
5251
assertThat(Files.readString(expectedPlainText), equalTo(Files.readString(actualPlainText)));
5352
assertThat(Files.readString(expectedJson), equalTo(Files.readString(actualJson)));

src/test/resources/arthas/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ com.taobao.arthas:arthas-all:4.0.4
2222
com.taobao.arthas:arthas-spy:4.0.4
2323
com.taobao.arthas:arthas-common:4.0.4
2424
com.taobao.arthas:math-game:4.0.4
25-
com.taobao.arthas:web-ui:4.0.4
25+
com.taobao.arthas:web-ui:4.0.4

src/test/resources/legend-engine/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,4 +491,4 @@ org.finos.legend.engine:legend-engine:4.56.0
491491
org.finos.legend.engine:legend-engine-executionPlan-execution-authorizer:4.56.0
492492
org.finos.legend.engine:legend-engine-executionPlan-execution-http-api:4.56.0
493493
org.finos.legend.engine:legend-engine-executionPlan-execution:4.56.0
494-
org.finos.legend.engine:legend-engine-executionPlan-dependencies:4.56.0
494+
org.finos.legend.engine:legend-engine-executionPlan-dependencies:4.56.0

src/test/resources/neo4j/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,4 @@ org.neo4j:parent:5.3.0-SNAPSHOT
122122
org.neo4j:neo4j-token-api:5.3.0-SNAPSHOT
123123
org.neo4j.licensing-proxy:zstd-proxy:5.3.0-SNAPSHOT
124124
org.neo4j.build:build-resources:5.3.0-SNAPSHOT
125-
org.neo4j:annotations:5.3.0-SNAPSHOT
125+
org.neo4j:annotations:5.3.0-SNAPSHOT

0 commit comments

Comments
 (0)