You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/04/11 11:49:51 UTC

(commons-cli) 02/15: Add test branches

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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-cli.git

commit 2d3586fdc5f499d59fe6f5626bb0556ab3049410
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Apr 11 06:39:44 2024 -0400

    Add test branches
---
 src/test/java/org/apache/commons/cli/OptionTest.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/cli/OptionTest.java b/src/test/java/org/apache/commons/cli/OptionTest.java
index d1287e4..00e607e 100644
--- a/src/test/java/org/apache/commons/cli/OptionTest.java
+++ b/src/test/java/org/apache/commons/cli/OptionTest.java
@@ -60,7 +60,7 @@ public class OptionTest {
 
         @Override
         public boolean addValue(final String value) {
-            addValueForProcessing(value);
+            processValue(value);
             return true;
         }
     }
@@ -76,6 +76,8 @@ public class OptionTest {
         assertEquals(required, option.isRequired());
 
         assertEquals(optionalArg, option.hasOptionalArg());
+        assertEquals(numArgs > 0, option.hasArg());
+        assertEquals(numArgs > 0, option.acceptsArg());
         assertEquals(valueSeparator, option.getValueSeparator());
         assertEquals(cls, option.getType());
         if (deprecatedDesc != null) {
@@ -245,7 +247,7 @@ public class OptionTest {
         assertEquals("default", option.getValue("default"));
         assertNull(option.getValue(0));
 
-        option.addValueForProcessing("foo");
+        option.processValue("foo");
 
         assertEquals("foo", option.getValue());
         assertEquals("foo", option.getValue(0));