Skip to content

Commit 9ff24a0

Browse files
committed
Add missing test branch
1 parent 76c70a0 commit 9ff24a0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/test/java/org/apache/commons/cli/HelpFormatterTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,10 @@ public void testPrintHelpNewlineHeader() {
351351
public void testPrintHelpWithEmptySyntax() {
352352
final HelpFormatter formatter = new HelpFormatter();
353353
assertThrows(IllegalArgumentException.class, () -> formatter.printHelp(null, new Options()), "null command line syntax should be rejected");
354-
assertThrows(IllegalArgumentException.class, () -> formatter.printHelp("", new Options()), "null command line syntax should be rejected");
354+
assertThrows(IllegalArgumentException.class, () -> formatter.printHelp(null, new Options(), true), "null command line syntax should be rejected");
355+
assertThrows(IllegalArgumentException.class, () -> formatter.printHelp(null, new Options(), false), "null command line syntax should be rejected");
356+
assertThrows(IllegalArgumentException.class, () -> formatter.printHelp("", new Options(), true), "null command line syntax should be rejected");
357+
assertThrows(IllegalArgumentException.class, () -> formatter.printHelp("", new Options(), false), "null command line syntax should be rejected");
355358
}
356359

357360
@Test

0 commit comments

Comments
 (0)