Skip to content

Commit b3c59f7

Browse files
committed
Fix on windows.
1 parent 959fd85 commit b3c59f7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/KotlinExtensionTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
package com.diffplug.gradle.spotless;
1717

18-
import static org.junit.jupiter.api.Assertions.assertTrue;
18+
import static org.assertj.core.api.Assertions.assertThat;
1919

2020
import java.io.File;
2121
import java.io.IOException;
@@ -96,13 +96,13 @@ void testWithInvalidEditorConfigFile() throws IOException {
9696
"repositories { mavenCentral() }",
9797
"spotless {",
9898
" kotlin {",
99-
" ktlint().setEditorConfigPath('" + invalidPath + "')",
99+
" ktlint().setEditorConfigPath('" + invalidPath.replace("\\", "\\\\") + "')",
100100
" }",
101101
"}");
102102
setFile("src/main/kotlin/Main.kt").toResource("kotlin/ktlint/experimentalEditorConfigOverride.dirty");
103103
String buildOutput = gradleRunner().withArguments("spotlessApply").buildAndFail().getOutput();
104-
assertTrue(buildOutput.contains("EditorConfig file does not exist: "));
105-
assertTrue(buildOutput.contains(invalidPath));
104+
assertThat(buildOutput).contains("EditorConfig file does not exist: ");
105+
assertThat(buildOutput).contains(invalidPath);
106106
}
107107

108108
@Test

0 commit comments

Comments
 (0)