This is an automated email from the ASF dual-hosted git repository.

sgoeschl pushed a commit to branch FREEMARKER-151
in repository https://gitbox.apache.org/repos/asf/freemarker-generator.git


The following commit(s) were added to refs/heads/FREEMARKER-151 by this push:
     new aebe065  FREEMARKER-151 [freemarker-cli] Ensure that build and and 
examples are running on Windows
aebe065 is described below

commit aebe065aafc5cc2a96d405fbf064cbf755c6cf5b
Author: Siegfried Goeschl <[email protected]>
AuthorDate: Mon Jul 6 15:24:48 2020 +0200

    FREEMARKER-151 [freemarker-cli] Ensure that build and and examples are 
running on Windows
---
 .../generator/datasource/DataSourcesSupplierTest.java   | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git 
a/freemarker-generator-base/src/test/java/org/apache/freemarker/generator/datasource/DataSourcesSupplierTest.java
 
b/freemarker-generator-base/src/test/java/org/apache/freemarker/generator/datasource/DataSourcesSupplierTest.java
index aacfd75..b17d745 100644
--- 
a/freemarker-generator-base/src/test/java/org/apache/freemarker/generator/datasource/DataSourcesSupplierTest.java
+++ 
b/freemarker-generator-base/src/test/java/org/apache/freemarker/generator/datasource/DataSourcesSupplierTest.java
@@ -25,6 +25,7 @@ import java.nio.file.Paths;
 import java.util.Arrays;
 import java.util.List;
 
+import static java.io.File.separator;
 import static java.util.Collections.singletonList;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -39,12 +40,14 @@ public class DataSourcesSupplierTest {
     @Test
     public void shouldResolveSingleFile() {
         assertEquals(1, supplier("pom.xml", "*", NO_EXCLUDE).get().size());
-        assertEquals(1, supplier("./pom.xml", "*", NO_EXCLUDE).get().size());
+        assertEquals(1, supplier("." + separator + "pom.xml", "*", 
NO_EXCLUDE).get().size());
         assertEquals(1, supplier("pom=pom.xml", "*", NO_EXCLUDE).get().size());
-        assertEquals(1, supplier("pom=./pom.xml", "*", 
NO_EXCLUDE).get().size());
-        assertEquals(1, supplier("pom=./pom.xml#mimetype=application/xml", 
"*", NO_EXCLUDE).get().size());
-        assertEquals(1, supplier("pom=" + PWD + "/pom.xml", "*", 
NO_EXCLUDE).get().size());
-        assertEquals(1, supplier("pom=file:///" + PWD + 
"/pom.xml#mimetype=application/xml", "*", NO_EXCLUDE).get()
+        assertEquals(1, supplier("pom=." + separator + "pom.xml", "*", 
NO_EXCLUDE).get().size());
+        assertEquals(1, supplier("pom=." + separator + 
"pom.xml#mimetype=application/xml", "*", NO_EXCLUDE).get()
+                .size());
+        assertEquals(1, supplier("pom=" + PWD + separator + "pom.xml", "*", 
NO_EXCLUDE).get().size());
+        assertEquals(1, supplier("pom=file:///" + PWD + separator + 
"pom.xml#mimetype=application/xml", "*", NO_EXCLUDE)
+                .get()
                 .size());
     }
 
@@ -131,7 +134,9 @@ public class DataSourcesSupplierTest {
     public void shouldNormalizeDataSourceNameBasedOnFilePath() {
         assertEquals("pom.xml", supplier("pom.xml", "*", 
NO_EXCLUDE).get().get(0).getName());
         assertEquals("pom.xml", supplier("./pom.xml", "*", 
NO_EXCLUDE).get().get(0).getName());
-        assertEquals("pom.xml", supplier("file:///" + PWD + "/pom.xml", "*", 
NO_EXCLUDE).get().get(0).getName());
+        assertEquals("pom.xml", supplier("file:///" + PWD + separator + 
"pom.xml", "*", NO_EXCLUDE).get()
+                .get(0)
+                .getName());
     }
 
     private static DataSourcesSupplier supplier(String directory, String 
include, String exclude) {

Reply via email to