From 2a338fc91248be5585a2d1d84999e548c7011427 Mon Sep 17 00:00:00 2001 From: Laurent SCHOELENS <61973605+laurentschoelens@users.noreply.github.com> Date: Tue, 12 Mar 2024 12:00:26 +0100 Subject: [PATCH] [#522] test dependent platform on fileseparator --- .../test/java/org/jvnet/jaxb/maven/util/IOUtilsTests.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/maven-plugin/plugin-core/src/test/java/org/jvnet/jaxb/maven/util/IOUtilsTests.java b/maven-plugin/plugin-core/src/test/java/org/jvnet/jaxb/maven/util/IOUtilsTests.java index 8203cf965..1d7203da4 100644 --- a/maven-plugin/plugin-core/src/test/java/org/jvnet/jaxb/maven/util/IOUtilsTests.java +++ b/maven-plugin/plugin-core/src/test/java/org/jvnet/jaxb/maven/util/IOUtilsTests.java @@ -3,6 +3,7 @@ import org.junit.Assert; import org.junit.Test; +import java.io.File; import java.util.List; public class IOUtilsTests { @@ -65,7 +66,7 @@ public void reorderFilesIncludesNoWildcardWithCommonSuffix() { @Test public void reorderFilesIncludesWithWildcardFirst() { - String[] files = {"a.xsd", "common/c1.xsd", "b.xsd", "common/c2.xsd", "common/a.xsd", "common/b.xsd" }; + String[] files = {"a.xsd", "common" + File.separatorChar + "c1.xsd", "b.xsd", "common" + File.separatorChar + "c2.xsd", "common" + File.separatorChar + "a.xsd", "common" + File.separatorChar + "b.xsd" }; List orderedFiles = IOUtils.reorderFiles(files, new String[] { "common/*.xsd", "a.xsd", "b.xsd" }); Assert.assertNotNull("Ordered files list should not be null", @@ -85,7 +86,7 @@ public void reorderFilesIncludesWithWildcardFirst() { @Test public void reorderFilesIncludesWithWildcardMiddle() { - String[] files = {"a.xsd", "common/c1.xsd", "b.xsd", "common/c2.xsd", "common/a.xsd", "common/b.xsd" }; + String[] files = {"a.xsd", "common" + File.separatorChar + "c1.xsd", "b.xsd", "common" + File.separatorChar + "c2.xsd", "common" + File.separatorChar + "a.xsd", "common" + File.separatorChar + "b.xsd" }; List orderedFiles = IOUtils.reorderFiles(files, new String[] { "a.xsd", "common/*.xsd", "b.xsd" }); Assert.assertNotNull("Ordered files list should not be null", @@ -106,7 +107,7 @@ public void reorderFilesIncludesWithWildcardMiddle() { @Test public void reorderFilesIncludesWithWildcardLast() { - String[] files = {"a.xsd", "common/c1.xsd", "b.xsd", "common/c2.xsd", "common/a.xsd", "common/b.xsd" }; + String[] files = {"a.xsd", "common" + File.separatorChar + "c1.xsd", "b.xsd", "common" + File.separatorChar + "c2.xsd", "common" + File.separatorChar + "a.xsd", "common" + File.separatorChar + "b.xsd" }; List orderedFiles = IOUtils.reorderFiles(files, new String[] { "a.xsd", "b.xsd", "common/*.xsd" }); Assert.assertNotNull("Ordered files list should not be null",