Skip to content

Commit 2b4dd07

Browse files
committed
Add plugin-maven test
1 parent a15fcee commit 2b4dd07

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

plugin-maven/src/test/java/com/diffplug/spotless/maven/java/GoogleJavaFormatTest.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2020 DiffPlug
2+
* Copyright 2016-2021 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.
@@ -17,6 +17,7 @@
1717

1818
import org.junit.Test;
1919

20+
import com.diffplug.spotless.JreVersion;
2021
import com.diffplug.spotless.maven.MavenIntegrationHarness;
2122

2223
public class GoogleJavaFormatTest extends MavenIntegrationHarness {
@@ -41,6 +42,18 @@ public void specificVersionSpecificStyle() throws Exception {
4142
runTest("java/googlejavaformat/JavaCodeFormattedAOSP.test");
4243
}
4344

45+
@Test
46+
public void specificVersionReflowLongStrings() throws Exception {
47+
JreVersion.assume11OrGreater();
48+
writePomWithJavaSteps(
49+
"<googleJavaFormat>",
50+
" <version>1.8</version>",
51+
" <reflowLongStrings>true</reflowLongStrings>",
52+
"</googleJavaFormat>");
53+
54+
runTest("java/googlejavaformat/JavaCodeFormattedReflowLongStrings.test");
55+
}
56+
4457
private void runTest(String targetResource) throws Exception {
4558
String path = "src/main/java/test.java";
4659
setFile(path).toResource("java/googlejavaformat/JavaCodeUnformatted.test");

0 commit comments

Comments
 (0)