Skip to content

Commit 413ccdf

Browse files
committed
Don't print debug info when building on Windows
Disable format logging when running on Windows since it seems to overwhelm surefure. See gh-95
1 parent 6c919f2 commit 413ccdf

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

spring-javaformat/spring-javaformat-formatter/src/test/java/io/spring/javaformat/formatter/FileFormatterTests.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
*/
3434
public class FileFormatterTests extends AbstractFormatterTests {
3535

36+
private static final boolean RUNNING_ON_WINDOWS = System.getProperty("os.name")
37+
.toLowerCase().contains("win");
38+
3639
public FileFormatterTests(File source, File expected) {
3740
super(source, expected);
3841
}
@@ -59,12 +62,14 @@ public void formatFileShouldFormatFile() throws Exception {
5962
FileEdit edit = new FileFormatter().formatFile(source, StandardCharsets.UTF_8);
6063
String formattedContent = edit.getFormattedContent();
6164
String expected = read(getExpected());
62-
System.out.println(source);
63-
System.out.println("----- got");
64-
System.out.println(formattedContent);
65-
System.out.println("----- expected");
66-
System.out.println(expected);
67-
System.out.println("-----");
65+
if (!RUNNING_ON_WINDOWS) {
66+
System.out.println(source);
67+
System.out.println("----- got");
68+
System.out.println(formattedContent);
69+
System.out.println("----- expected");
70+
System.out.println(expected);
71+
System.out.println("-----");
72+
}
6873
assertThat(formattedContent).isEqualTo(expected);
6974
}
7075

0 commit comments

Comments
 (0)