commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r695672 - in /commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli: ParserTestCase.java bug/BugCLI51Test.java
Date Mon, 15 Sep 2008 22:19:12 GMT
Author: ebourg
Date: Mon Sep 15 15:19:11 2008
New Revision: 695672

URL: http://svn.apache.org/viewvc?rev=695672&view=rev
Log:
Merged BugCLI51Test into ParserTestCase

Removed:
    commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/bug/BugCLI51Test.java
Modified:
    commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/ParserTestCase.java

Modified: commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/ParserTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/ParserTestCase.java?rev=695672&r1=695671&r2=695672&view=diff
==============================================================================
--- commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/ParserTestCase.java
(original)
+++ commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/ParserTestCase.java
Mon Sep 15 15:19:11 2008
@@ -227,6 +227,14 @@
         assertEquals("-1", cl.getOptionValue("b"));
     }
 
+    public void testArgumentStartingWithHyphen() throws Exception
+    {
+        String[] args = new String[]{"-b", "-foo"};
+
+        CommandLine cl = parser.parse(options, args);
+        assertEquals("-foo", cl.getOptionValue("b"));
+    }
+
     public void testShortWithEqual() throws Exception
     {
         String[] args = new String[] { "-f=bar" };



Mime
View raw message