sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1491848 - in /sis/branches/JDK7/application/sis-console/src: main/java/org/apache/sis/console/ main/resources/org/apache/sis/console/ test/java/org/apache/sis/console/ test/java/org/apache/sis/test/ test/java/org/apache/sis/test/suite/
Date Tue, 11 Jun 2013 15:45:34 GMT
Author: desruisseaux
Date: Tue Jun 11 15:45:34 2013
New Revision: 1491848

URL: http://svn.apache.org/r1491848
Log:
More help information.

Added:
    sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
  (with props)
    sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands_fr.properties
  (with props)
    sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options_fr.properties
  (with props)
    sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/console/HelpSCTest.java
  (with props)
    sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/test/
    sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/test/suite/
    sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/test/suite/ConsoleTestSuite.java
  (with props)
Modified:
    sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/HelpSC.java
    sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands.properties
    sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options.properties

Modified: sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/HelpSC.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/HelpSC.java?rev=1491848&r1=1491847&r2=1491848&view=diff
==============================================================================
--- sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/HelpSC.java
[UTF-8] (original)
+++ sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/HelpSC.java
[UTF-8] Tue Jun 11 15:45:34 2013
@@ -56,12 +56,16 @@ final class HelpSC extends SubCommand {
         final ResourceBundle commands = ResourceBundle.getBundle("org.apache.sis.console.Commands",
locale);
         final ResourceBundle options  = ResourceBundle.getBundle("org.apache.sis.console.Options",
locale);
         final Vocabulary vocabulary = Vocabulary.getResources(locale);
+        out.print("Apache SIS, ");
+        out.println(commands.getString("SIS"));
+        out.println(commands.getString("Usage"));
+        out.println();
         out.print(vocabulary.getString(Vocabulary.Keys.Commands));
         out.println(':');
         try {
             final TableAppender table = new TableAppender(out, "  ");
             for (final String command : COMMANDS) {
-                table.append(' ').append(command);
+                table.append("  ").append(command);
                 table.nextColumn();
                 table.append(commands.getString(command));
                 table.nextLine();
@@ -72,7 +76,7 @@ final class HelpSC extends SubCommand {
             out.println(':');
             for (final Option option : Option.values()) {
                 final String name = option.name().toLowerCase(Locale.US);
-                table.append(' ').append(Option.PREFIX).append(name);
+                table.append("  ").append(Option.PREFIX).append(name);
                 table.nextColumn();
                 table.append(options.getString(name));
                 table.nextLine();

Added: sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/package-info.java?rev=1491848&view=auto
==============================================================================
--- sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
(added)
+++ sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
[UTF-8] Tue Jun 11 15:45:34 2013
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Command line interface for Apache SIS.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.3
+ * @version 0.3
+ * @module
+ */
+package org.apache.sis.console;

Propchange: sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands.properties?rev=1491848&r1=1491847&r2=1491848&view=diff
==============================================================================
--- sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands.properties
[ISO-8859-1] Tue Jun 11 15:45:34 2013
@@ -1,3 +1,6 @@
 # Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements.
-about=Show information about the Apache SIS version and configuration.
+SIS=Spatial Information System
+Usage=Usage: sis <sub-command> [options] [files]
+
+about=Show information about Apache SIS and system configuration.
 help=Show a help overview.

Added: sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands_fr.properties?rev=1491848&view=auto
==============================================================================
--- sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands_fr.properties
(added)
+++ sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands_fr.properties
[ISO-8859-1] Tue Jun 11 15:45:34 2013
@@ -0,0 +1,6 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements.
+SIS=Syst\u00e8me d\u2019informations spatiales
+Usage=Usage: sis <sous-commande> [options] [fichiers]
+
+about=Affiche des informations \u00e0 propos de Apache SIS et de la configuration du syst\u00e8me.
+help=Affiche un \u00e9cran d\u2019aide.

Propchange: sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands_fr.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Commands_fr.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=ISO-8859-1

Modified: sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options.properties?rev=1491848&r1=1491847&r2=1491848&view=diff
==============================================================================
--- sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options.properties
[ISO-8859-1] Tue Jun 11 15:45:34 2013
@@ -1,6 +1,6 @@
 # Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements.
-locale=The locale for the output produced by the command.
-encoding=The encoding for the output produced by the command.
+locale=The locale to use for the command output.
+encoding=The encoding to use for the command output.
 timezone=The timezone for the dates to be formatted.
 colors=Whether colorized output shall be enabled.
 brief=Whether the output should contains only brief information.

Added: sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options_fr.properties?rev=1491848&view=auto
==============================================================================
--- sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options_fr.properties
(added)
+++ sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options_fr.properties
[ISO-8859-1] Tue Jun 11 15:45:34 2013
@@ -0,0 +1,7 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements.
+locale=Les param\u00e8tres r\u00e9gionaux \u00e0 utiliser pour la sortie de la commande.
+encoding=L\u2019encodage des caract\u00e8res \u00e0 utiliser pour la sortie de la commande.
+timezone=Le fuseau horaire des dates \u00e0 \u00e9crire.
+colors=Indique si l\u2019affichage peut \u00eatre en couleurs.
+brief=Indique si la sortie de la commande ne doit contenir que de br\u00e8ves informations.
+verbose=Indique si la sortie de la commande doit contenir des informations plus d\u00e9taill\u00e9es.

Propchange: sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options_fr.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/application/sis-console/src/main/resources/org/apache/sis/console/Options_fr.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=ISO-8859-1

Added: sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/console/HelpSCTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/console/HelpSCTest.java?rev=1491848&view=auto
==============================================================================
--- sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/console/HelpSCTest.java
(added)
+++ sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/console/HelpSCTest.java
[UTF-8] Tue Jun 11 15:45:34 2013
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.console;
+
+import org.apache.sis.test.TestCase;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+
+/**
+ * Tests the {@link HelpSC} subcommand.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.3
+ * @version 0.3
+ * @module
+ */
+public final strictfp class HelpSCTest extends TestCase {
+    /**
+     * Tests the sub-command with default options.
+     *
+     * @throws InvalidOptionException Should never happen.
+     */
+    @Test
+    public void testDefault() throws InvalidOptionException {
+        final HelpSC test = new HelpSC(0, SubCommand.TEST);
+        test.run();
+        final String result = test.outputBuffer.toString();
+        assertTrue(result.startsWith("Apache SIS"));
+        assertTrue(result.contains("--locale"));
+        assertTrue(result.contains("--encoding"));
+        assertTrue(result.contains("--timezone"));
+        assertTrue(result.contains("--brief"));
+        assertTrue(result.contains("--verbose"));
+    }
+}

Propchange: sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/console/HelpSCTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/console/HelpSCTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/test/suite/ConsoleTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/test/suite/ConsoleTestSuite.java?rev=1491848&view=auto
==============================================================================
--- sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/test/suite/ConsoleTestSuite.java
(added)
+++ sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/test/suite/ConsoleTestSuite.java
[UTF-8] Tue Jun 11 15:45:34 2013
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.test.suite;
+
+import org.apache.sis.test.TestSuite;
+import org.junit.runners.Suite;
+import org.junit.BeforeClass;
+
+
+/**
+ * All tests from the {@code sis-console} module, in approximative dependency order.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.3
+ * @version 0.3
+ * @module
+ */
+@Suite.SuiteClasses({
+    org.apache.sis.console.HelpSCTest.class
+})
+public final strictfp class ConsoleTestSuite extends TestSuite {
+    /**
+     * Verifies the list of tests before to run the suite.
+     * See {@link #verifyTestList(Class, Class[])} for more information.
+     */
+    @BeforeClass
+    public static void verifyTestList() {
+        verifyTestList(ConsoleTestSuite.class, BASE_TEST_CLASSES);
+    }
+}

Propchange: sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/test/suite/ConsoleTestSuite.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/application/sis-console/src/test/java/org/apache/sis/test/suite/ConsoleTestSuite.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8



Mime
View raw message