sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1584093 - in /sis/branches/0.4/application/sis-console/src: main/java/org/apache/sis/console/ main/resources/org/apache/sis/console/ test/java/org/apache/sis/console/
Date Wed, 02 Apr 2014 17:04:09 GMT
Author: desruisseaux
Date: Wed Apr  2 17:04:09 2014
New Revision: 1584093

URL: http://svn.apache.org/r1584093
Log:
Merge the fix for the use of English locale on non-English system.

Added:
    sis/branches/0.4/application/sis-console/src/main/resources/org/apache/sis/console/Commands_en.properties
      - copied unchanged from r1584092, sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands_en.properties
    sis/branches/0.4/application/sis-console/src/main/resources/org/apache/sis/console/Options_en.properties
      - copied unchanged from r1584092, sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options_en.properties
Modified:
    sis/branches/0.4/application/sis-console/src/main/java/org/apache/sis/console/HelpSC.java
    sis/branches/0.4/application/sis-console/src/test/java/org/apache/sis/console/HelpSCTest.java

Modified: sis/branches/0.4/application/sis-console/src/main/java/org/apache/sis/console/HelpSC.java
URL: http://svn.apache.org/viewvc/sis/branches/0.4/application/sis-console/src/main/java/org/apache/sis/console/HelpSC.java?rev=1584093&r1=1584092&r2=1584093&view=diff
==============================================================================
--- sis/branches/0.4/application/sis-console/src/main/java/org/apache/sis/console/HelpSC.java
[UTF-8] (original)
+++ sis/branches/0.4/application/sis-console/src/main/java/org/apache/sis/console/HelpSC.java
[UTF-8] Wed Apr  2 17:04:09 2014
@@ -29,7 +29,7 @@ import org.apache.sis.util.resources.Voc
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.3
+ * @version 0.4
  * @module
  */
 final class HelpSC extends SubCommand {
@@ -40,7 +40,8 @@ final class HelpSC extends SubCommand {
         "help",
         "about",
         "mime-type",
-        "metadata"
+        "metadata",
+        "crs"
     };
 
     /**

Modified: sis/branches/0.4/application/sis-console/src/test/java/org/apache/sis/console/HelpSCTest.java
URL: http://svn.apache.org/viewvc/sis/branches/0.4/application/sis-console/src/test/java/org/apache/sis/console/HelpSCTest.java?rev=1584093&r1=1584092&r2=1584093&view=diff
==============================================================================
--- sis/branches/0.4/application/sis-console/src/test/java/org/apache/sis/console/HelpSCTest.java
[UTF-8] (original)
+++ sis/branches/0.4/application/sis-console/src/test/java/org/apache/sis/console/HelpSCTest.java
[UTF-8] Wed Apr  2 17:04:09 2014
@@ -71,4 +71,32 @@ public final strictfp class HelpSCTest e
         assertFalse("--verbose",  result.contains("--verbose"));
         assertTrue ("--help",     result.contains("--help"));
     }
+
+    /**
+     * Tests the sub-command with the {@code --locale en} option.
+     *
+     * @throws InvalidOptionException Should never happen.
+     */
+    @Test
+    public void testEnglishLocale() throws InvalidOptionException {
+        final HelpSC test = new HelpSC(0, SubCommand.TEST, "--help", "--locale", "en");
+        test.help("help");
+        final String result = test.outputBuffer.toString();
+        assertTrue(result, result.contains("Show a help overview."));
+        assertTrue(result, result.contains("The locale to use"));
+    }
+
+    /**
+     * Tests the sub-command with the {@code --locale fr} option.
+     *
+     * @throws InvalidOptionException Should never happen.
+     */
+    @Test
+    public void testFrenchLocale() throws InvalidOptionException {
+        final HelpSC test = new HelpSC(0, SubCommand.TEST, "--help", "--locale", "fr");
+        test.help("help");
+        final String result = test.outputBuffer.toString();
+        assertTrue(result, result.contains("Affiche un écran d’aide."));
+        assertTrue(result, result.contains("Les paramètres régionaux"));
+    }
 }



Mime
View raw message