Skip to content

Commit

Permalink
Fix on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Aug 24, 2023
1 parent 959fd85 commit b3c59f7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.diffplug.gradle.spotless;

import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.assertj.core.api.Assertions.assertThat;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -96,13 +96,13 @@ void testWithInvalidEditorConfigFile() throws IOException {
"repositories { mavenCentral() }",
"spotless {",
" kotlin {",
" ktlint().setEditorConfigPath('" + invalidPath + "')",
" ktlint().setEditorConfigPath('" + invalidPath.replace("\\", "\\\\") + "')",
" }",
"}");
setFile("src/main/kotlin/Main.kt").toResource("kotlin/ktlint/experimentalEditorConfigOverride.dirty");
String buildOutput = gradleRunner().withArguments("spotlessApply").buildAndFail().getOutput();
assertTrue(buildOutput.contains("EditorConfig file does not exist: "));
assertTrue(buildOutput.contains(invalidPath));
assertThat(buildOutput).contains("EditorConfig file does not exist: ");
assertThat(buildOutput).contains(invalidPath);
}

@Test
Expand Down

0 comments on commit b3c59f7

Please sign in to comment.