Skip to content

Commit

Permalink
Fix DiffMessageFormatterTest on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed May 28, 2020
1 parent 726f614 commit f0d334f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ private class Bundle {
file = setFile("src/test." + name).toContent("CCC");
task = createFormatTask(name);
check = createCheckTask(name, task);
createApplyTask(name, task);
}

private SpotlessTask createFormatTask(String name) {
Expand All @@ -64,6 +65,13 @@ private SpotlessCheck createCheckTask(String name, SpotlessTask source) {
return task;
}

private SpotlessApply createApplyTask(String name, SpotlessTask source) {
SpotlessApply task = project.getTasks().create("spotless" + SpotlessPlugin.capitalize(name) + "Apply", SpotlessApply.class);
task.linkSource(this.task);
task.setSpotlessOutDirectory(source.getOutputDirectory());
return task;
}

String checkFailureMsg() {
try {
check();
Expand All @@ -75,7 +83,7 @@ String checkFailureMsg() {

void check() throws Exception {
execute(task);
check.performAction();
check.performActionTest();
}
}

Expand Down

0 comments on commit f0d334f

Please sign in to comment.