Skip to content

Commit cb3b845

Browse files
committed
Improved test coverage for OptionBuilder
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/branches/cli-1.x@661612 13f79535-47bb-0310-9956-ffa450edef68
1 parent 5f8a570 commit cb3b845

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,16 @@ public void testIllegalOptions() {
135135
fail( "IllegalArgumentException caught" );
136136
}
137137
}
138+
139+
public void testCreateIncompleteOption() {
140+
try
141+
{
142+
OptionBuilder.hasArg().create();
143+
fail("Incomplete option should be rejected");
144+
}
145+
catch (IllegalArgumentException e)
146+
{
147+
// expected
148+
}
149+
}
138150
}

0 commit comments

Comments
 (0)