Skip to content

Commit

Permalink
Update the expected test output with actual after default indent was …
Browse files Browse the repository at this point in the history
…reduced
  • Loading branch information
vlsi committed Dec 28, 2019
1 parent b61f339 commit ed32c8e
Show file tree
Hide file tree
Showing 6 changed files with 337 additions and 327 deletions.
2 changes: 1 addition & 1 deletion plugin-gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ cmd> gradlew build
+\t\tif·(targets.length·==·0)·{
...
You might want to adjust -PmaxCheckMessageLines=50 -PmaxFilesToList=10 -PminLinesPerFile=4 to see more violations
Run 'gradlew autostyleApply' to fix these violations.
Run './gradlew autostyleApply' to fix the violations.
cmd> gradlew autostyleApply
:autostyleApply
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ abstract class AutostyleTask @Inject constructor(
minLinesPerFile = project.intProperty("minLinesPerFile") ?: minLinesPerFile
diff(problemFiles.sorted(), paddedCell.get())
}
sb.append("Run './gradlew autostyleApply' to fix the violations")
sb.append("Run './gradlew autostyleApply' to fix the violations.")
return GradleException(sb.toString())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public void testStepCheckFail() throws IOException {
checkTask.addStep(FormatterStep.createNeverUpToDate("double-p", content -> content.replace("pp", "p")));

String diff = String.join("\n",
" @@ -1 +1 @@",
" -apple",
" +aple");
" @@ -1 +1 @@",
" -apple",
" +aple");
Assertions.assertThatThrownBy(() -> execute(checkTask)).hasStackTraceContaining(diff);

assertFile(testFile).hasContent("apple");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,21 +183,21 @@ private void assertFolderContents(String subfolderName, String... files) throws
public void paddedCellCheckCycleFailureMsg() throws IOException {
assertFailureMessage(cycle().paddedCell(),
"The following files have format violations:",
slashify(" src/test.cycle"),
" @@ -1 +1 @@",
" -CCC",
" +A",
"Run 'gradlew autostyleApply' to fix these violations.");
slashify(" src/test.cycle"),
" @@ -1 +1 @@",
" -CCC",
" +A",
"Run './gradlew autostyleApply' to fix the violations.");
}

@Test
public void paddedCellCheckConvergeFailureMsg() throws IOException {
assertFailureMessage(converge().paddedCell(),
"The following files have format violations:",
slashify(" src/test.converge"),
" @@ -1 +0,0 @@",
" -CCC",
"Run 'gradlew autostyleApply' to fix these violations.");
slashify(" src/test.converge"),
" @@ -1 +0,0 @@",
" -CCC",
"Run './gradlew autostyleApply' to fix the violations.");
}

private void assertFailureMessage(Bundle bundle, String... expectedOutput) {
Expand Down
Loading

0 comments on commit ed32c8e

Please sign in to comment.