You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2019/07/28 09:24:07 UTC

[maven-javadoc-plugin] branch MJAVADOC-616 created (now 1969cea)

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

rfscholte pushed a change to branch MJAVADOC-616
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git.


      at 1969cea  [MJAVADOC-616] Adjust test to please generate-test-metadata goal

This branch includes the following new commits:

     new 12eaec4  Fix for MJAVADOC-616
     new 1969cea  [MJAVADOC-616] Adjust test to please generate-test-metadata goal

The 2 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.



[maven-javadoc-plugin] 01/02: Fix for MJAVADOC-616

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

rfscholte pushed a commit to branch MJAVADOC-616
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git

commit 12eaec436f6f8310fdd9dcd8e9d56945c450d163
Author: Doychin Bondzhev <do...@dsoft-bg.com>
AuthorDate: Fri Jul 19 10:25:24 2019 +0300

    Fix for MJAVADOC-616
    
    Signed-off-by: Doychin Bondzhev <do...@dsoft-bg.com>
---
 .../java/org/apache/maven/plugins/javadoc/JavadocReportTest.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
index 765ff16..9c7e23f 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
@@ -69,8 +69,11 @@ import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
 public class JavadocReportTest
     extends AbstractMojoTestCase
 {
+
     private static final char LINE_SEPARATOR = ' ';
 
+    public static final String OPTIONS_UMLAUT_ENCODING_Ö_Ä_Ü_ß = "Options Umlaut Encoding ö ä ü ß";
+
     /** flag to copy repo only one time */
     private static boolean TEST_REPO_CREATED = false;
 
@@ -567,6 +570,7 @@ public class JavadocReportTest
 
         // check for a part of the window title
         String content;
+        String expected = OPTIONS_UMLAUT_ENCODING_Ö_Ä_Ü_ß;
         if ( JavaVersion.JAVA_VERSION.isAtLeast( "9" ) )
         {
             content = readFile( optionsFile, StandardCharsets.UTF_8 );
@@ -574,8 +578,10 @@ public class JavadocReportTest
         else
         {
             content = readFile( optionsFile, Charset.defaultCharset() );
+            expected = new String(expected.getBytes(Charset.defaultCharset()));
         }
-        assertTrue( content.contains( "Options Umlaut Encoding ö ä ü ß" ) );
+
+        assertTrue( content.contains(expected) );
 
         File apidocs = new File( getBasedir(), "target/test/unit/optionsumlautencoding-test/target/site/apidocs" );
 


[maven-javadoc-plugin] 02/02: [MJAVADOC-616] Adjust test to please generate-test-metadata goal

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

rfscholte pushed a commit to branch MJAVADOC-616
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git

commit 1969ceaa451833ab147d061fcde2032f32408854
Author: rfscholte <rf...@apache.org>
AuthorDate: Sun Jul 28 11:23:59 2019 +0200

    [MJAVADOC-616] Adjust test to please generate-test-metadata goal
---
 .../org/apache/maven/plugins/javadoc/JavadocReportTest.java | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
index 9c7e23f..4e01410 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
@@ -72,7 +72,7 @@ public class JavadocReportTest
 
     private static final char LINE_SEPARATOR = ' ';
 
-    public static final String OPTIONS_UMLAUT_ENCODING_Ö_Ä_Ü_ß = "Options Umlaut Encoding ö ä ü ß";
+    public static final String OPTIONS_UMLAUT_ENCODING = "Options Umlaut Encoding ö ä ü ß";
 
     /** flag to copy repo only one time */
     private static boolean TEST_REPO_CREATED = false;
@@ -559,9 +559,9 @@ public class JavadocReportTest
      * @throws Exception if any
      */
     public void testOptionsUmlautEncoding()
-            throws Exception
+        throws Exception
     {
-        File testPom = new File(unit, "optionsumlautencoding-test/optionsumlautencoding-test-plugin-config.xml" );
+        File testPom = new File( unit, "optionsumlautencoding-test/optionsumlautencoding-test-plugin-config.xml" );
         JavadocReport mojo = lookupMojo( testPom );
         mojo.execute();
 
@@ -570,18 +570,19 @@ public class JavadocReportTest
 
         // check for a part of the window title
         String content;
-        String expected = OPTIONS_UMLAUT_ENCODING_Ö_Ä_Ü_ß;
+        String expected;
         if ( JavaVersion.JAVA_VERSION.isAtLeast( "9" ) )
         {
             content = readFile( optionsFile, StandardCharsets.UTF_8 );
+            expected = OPTIONS_UMLAUT_ENCODING;
         }
         else
         {
             content = readFile( optionsFile, Charset.defaultCharset() );
-            expected = new String(expected.getBytes(Charset.defaultCharset()));
+            expected = new String( OPTIONS_UMLAUT_ENCODING.getBytes( Charset.defaultCharset() ) );
         }
 
-        assertTrue( content.contains(expected) );
+        assertTrue( content.contains( expected ) );
 
         File apidocs = new File( getBasedir(), "target/test/unit/optionsumlautencoding-test/target/site/apidocs" );