garydgregory commented on a change in pull request #74: URL: https://github.com/apache/commons-cli/pull/74#discussion_r734518928
########## File path: src/test/java/org/apache/commons/cli/OptionTest.java ########## @@ -81,6 +81,31 @@ public void testBuilderInsufficientParams2() { Option.builder(null).desc("desc").build(); } + @Test(expected = IllegalArgumentException.class) + public void testBuilderInvalidOptionName1() { + Option.builder().option("invalid?").build(); + } + + @Test(expected = IllegalArgumentException.class) + public void testBuilderInvalidOptionName2() { + Option.builder().option("invalid@").build(); + } + + @Test(expected = IllegalArgumentException.class) + public void testBuilderInvalidOptionName3() { + Option.builder("invalid?").build(); + } + + @Test(expected = IllegalArgumentException.class) + public void testBuilderInvalidOptionName4() { + Option.builder("invalid@").build(); + } + + @Test(expected = IllegalArgumentException.class) + public void testBuilderNullOption() { + Option.builder().option(null).build(); Review comment: You do not need this test, it is the same as `testBuilderInsufficientParams2()` above. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org