Skip to content

Commit 92e4871

Browse files
committed
Added a unit test for Util.stripLeadingAndTrailingQuotes
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/branches/cli-1.x@661586 13f79535-47bb-0310-9956-ffa450edef68
1 parent d3c2977 commit 92e4871

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ public class UtilTest extends TestCase {
2727
public void testStripLeadingHyphens() {
2828
assertEquals("f", Util.stripLeadingHyphens("-f"));
2929
assertEquals("foo", Util.stripLeadingHyphens("--foo"));
30+
assertEquals("-foo", Util.stripLeadingHyphens("---foo"));
3031
assertNull(Util.stripLeadingHyphens(null));
3132
}
33+
34+
public void testStripLeadingAndTrailingQuotes() {
35+
assertEquals("foo", Util.stripLeadingAndTrailingQuotes("\"foo\""));
36+
}
3237
}

0 commit comments

Comments
 (0)