Skip to content

Commit 6f92ad7

Browse files
committed
More test fixups.
1 parent f8c3569 commit 6f92ad7

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ void useJavaCommunityPluginFileConfig(String prettierVersion) throws IOException
208208
assertFile("JavaTest.java").sameAsResource("npm/prettier/plugins/java-test.clean");
209209
}
210210

211+
@ParameterizedTest(name = "{index}: suggestsMissingJavaCommunityPlugin with prettier {0}")
211212
@Disabled
212213
@ForLintRefactor
213-
@ParameterizedTest(name = "{index}: suggestsMissingJavaCommunityPlugin with prettier {0}")
214214
@ValueSource(strings = {PRETTIER_VERSION_2, PRETTIER_VERSION_3})
215215
void suggestsMissingJavaCommunityPlugin(String prettierVersion) throws IOException {
216216
setFile("build.gradle").toLines(
@@ -335,9 +335,9 @@ void usePhpAndJavaCommunityPlugin(String prettierVersion) throws IOException {
335335
assertFile("JavaTest.java").sameAsResource("npm/prettier/plugins/java-test.clean");
336336
}
337337

338+
@ParameterizedTest(name = "{index}: autodetectNpmrcFileConfig with prettier {0}")
338339
@Disabled
339340
@ForLintRefactor
340-
@ParameterizedTest(name = "{index}: autodetectNpmrcFileConfig with prettier {0}")
341341
@ValueSource(strings = {PRETTIER_VERSION_2, PRETTIER_VERSION_3})
342342
void autodetectNpmrcFileConfig(String prettierVersion) throws IOException {
343343
setFile(".npmrc").toLines(
@@ -413,6 +413,8 @@ void verifyCleanAndSpotlessWithNpmInstallCacheWorks(String prettierVersion) thro
413413
}
414414

415415
@ParameterizedTest(name = "{index}: autodetectNpmrcFileConfig with prettier {0}")
416+
@Disabled
417+
@ForLintRefactor
416418
@ValueSource(strings = {PRETTIER_VERSION_2, PRETTIER_VERSION_3})
417419
void pickupNpmrcFileConfig(String prettierVersion) throws IOException {
418420
setFile(".custom_npmrc").toLines(

testlib/src/test/java/com/diffplug/spotless/kotlin/DiktatStepTest.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021-2023 DiffPlug
2+
* Copyright 2021-2024 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,11 +33,11 @@ class DiktatStepTest extends ResourceHarness {
3333
@Test
3434
void behavior() {
3535
FormatterStep step = DiktatStep.create(TestProvisioner.mavenCentral());
36-
StepHarnessWithFile.forStep(this, step).testResourceExceptionMsg("kotlin/diktat/Unsolvable.kt").isEqualTo("There are 2 unfixed errors:" +
37-
System.lineSeparator() + "Error on line: 12, column: 9 cannot be fixed automatically" +
38-
System.lineSeparator() + "[DEBUG_PRINT] use a dedicated logging library: found println()" +
39-
System.lineSeparator() + "Error on line: 13, column: 9 cannot be fixed automatically" +
40-
System.lineSeparator() + "[DEBUG_PRINT] use a dedicated logging library: found println()");
36+
StepHarnessWithFile.forStep(this, step).testResourceExceptionMsg("kotlin/diktat/Unsolvable.kt").isEqualTo("There are 2 unfixed errors:\n" +
37+
"Error on line: 12, column: 9 cannot be fixed automatically\n" +
38+
"[DEBUG_PRINT] use a dedicated logging library: found println()\n" +
39+
"Error on line: 13, column: 9 cannot be fixed automatically\n" +
40+
"[DEBUG_PRINT] use a dedicated logging library: found println()");
4141
}
4242

4343
@Test
@@ -47,11 +47,11 @@ void behaviorConf() throws Exception {
4747
FileSignature config = signAsList(conf);
4848

4949
FormatterStep step = DiktatStep.create("1.2.1", TestProvisioner.mavenCentral(), config);
50-
StepHarnessWithFile.forStep(this, step).testResourceExceptionMsg("kotlin/diktat/Unsolvable.kt").isEqualTo("There are 2 unfixed errors:" +
51-
System.lineSeparator() + "Error on line: 1, column: 1 cannot be fixed automatically" +
52-
System.lineSeparator() + "[DEBUG_PRINT] use a dedicated logging library: found println()" +
53-
System.lineSeparator() + "Error on line: 13, column: 9 cannot be fixed automatically" +
54-
System.lineSeparator() + "[DEBUG_PRINT] use a dedicated logging library: found println()");
50+
StepHarnessWithFile.forStep(this, step).testResourceExceptionMsg("kotlin/diktat/Unsolvable.kt").isEqualTo("There are 2 unfixed errors:\n" +
51+
"Error on line: 1, column: 1 cannot be fixed automatically\n" +
52+
"[DEBUG_PRINT] use a dedicated logging library: found println()\n" +
53+
"Error on line: 13, column: 9 cannot be fixed automatically\n" +
54+
"[DEBUG_PRINT] use a dedicated logging library: found println()");
5555
}
5656

5757
@Test

0 commit comments

Comments
 (0)