You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2018/02/23 18:43:33 UTC

[maven-shared-utils] branch MSHARED-685 created (now 82a6ed7)

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

khmarbaise pushed a change to branch MSHARED-685
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git.


      at 82a6ed7  [MSHARED-685] - DirectoryScanner#checkSymlinkBehaviour() does not use assert*  o Replaced System.out.* with real checkings.

This branch includes the following new commits:

     new 82a6ed7  [MSHARED-685] - DirectoryScanner#checkSymlinkBehaviour() does not use assert*  o Replaced System.out.* with real checkings.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
khmarbaise@apache.org.

[maven-shared-utils] 01/01: [MSHARED-685] - DirectoryScanner#checkSymlinkBehaviour() does not use assert* o Replaced System.out.* with real checkings.

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MSHARED-685
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git

commit 82a6ed7db6aadd7e23ec0aea1049f23d1f37cfc8
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Fri Feb 23 19:42:33 2018 +0100

    [MSHARED-685] - DirectoryScanner#checkSymlinkBehaviour() does not use
    assert*
     o Replaced System.out.* with real checkings.
---
 .../shared/utils/io/DirectoryScannerTest.java      | 32 ++++++++++++++++++++--
 .../maven/shared/utils/xml/XmlWriterUtilTest.java  |  1 -
 2 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/src/test/java/org/apache/maven/shared/utils/io/DirectoryScannerTest.java b/src/test/java/org/apache/maven/shared/utils/io/DirectoryScannerTest.java
index e331db9..26b114a 100644
--- a/src/test/java/org/apache/maven/shared/utils/io/DirectoryScannerTest.java
+++ b/src/test/java/org/apache/maven/shared/utils/io/DirectoryScannerTest.java
@@ -33,6 +33,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assume.assumeFalse;
@@ -132,9 +133,34 @@ public class DirectoryScannerTest
         String[] includedDirectories = ds.getIncludedDirectories();
         String[] files = ds.getIncludedFiles();
         
-        //FIXME: This should be changed to some kind of assert...WhatEver()...
-        System.out.println( "files = " + files );
-
+        assertEquals( 9, files.length );
+        assertEquals( 5,  includedDirectories.length );
+        
+        //@formatter:off
+        String[] expectedFiles = { 
+            "aRegularDir/aRegularFile.txt", 
+            "fileR.txt", 
+            "fileW.txt", 
+            "fileX.txt", 
+            "symLinkToFileOnTheOutside",
+            "symR",
+            "symW",
+            "symX",
+            "targetDir/targetFile.txt",
+        };
+        //@formatter:on
+        assertArrayEquals( expectedFiles, files );
+
+        //@formatter:off
+        String[] expectedDirs = {
+            "",
+            "aRegularDir",
+            "symDir",
+            "symLinkToDirOnTheOutside",
+            "targetDir",
+        };
+        //@formatter:on
+        assertArrayEquals( expectedDirs, includedDirectories );
 
     }
 
diff --git a/src/test/java/org/apache/maven/shared/utils/xml/XmlWriterUtilTest.java b/src/test/java/org/apache/maven/shared/utils/xml/XmlWriterUtilTest.java
index 894774a..67a3283 100644
--- a/src/test/java/org/apache/maven/shared/utils/xml/XmlWriterUtilTest.java
+++ b/src/test/java/org/apache/maven/shared/utils/xml/XmlWriterUtilTest.java
@@ -72,7 +72,6 @@ public class XmlWriterUtilTest
     {
         XmlWriterUtil.writeLineBreak( xmlWriter );
         writer.close();
-        System.out.println( "output = " + output.toString() + "x");
         assertTrue( StringUtils.countMatches( output.toString(), XmlWriterUtil.LS ) == 1 );
     }
 

-- 
To stop receiving notification emails like this one, please contact
khmarbaise@apache.org.