Skip to content

Commit 01e8639

Browse files
committed
Ensure support for sortpom versions back to 3.2.1
1 parent baaed39 commit 01e8639

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

testlib/src/test/java/com/diffplug/spotless/pom/SortPomTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
package com.diffplug.spotless.pom;
1717

1818
import org.junit.jupiter.api.Test;
19+
import org.junit.jupiter.params.ParameterizedTest;
20+
import org.junit.jupiter.params.provider.ValueSource;
1921

2022
import com.diffplug.spotless.*;
2123

@@ -27,10 +29,11 @@ public void testSortPomWithDefaultConfig() {
2729
StepHarness.forStep(step).testResource("pom/pom_dirty.xml", "pom/pom_clean_default.xml");
2830
}
2931

30-
@Test
31-
public void testSortPomWithVersion() {
32+
@ParameterizedTest
33+
@ValueSource(strings = {"3.2.1", "3.3.0", "3.4.1", "4.0.0"})
34+
public void testSortPomWithVersion(String version) {
3235
SortPomCfg cfg = new SortPomCfg();
33-
cfg.version = "4.0.0";
36+
cfg.version = version;
3437
FormatterStep step = SortPomStep.create(cfg, TestProvisioner.mavenCentral());
3538
StepHarness.forStep(step).testResource("pom/pom_dirty.xml", "pom/pom_clean_default.xml");
3639
}

0 commit comments

Comments
 (0)