You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/04/08 13:13:19 UTC
(commons-cli) 09/12: Add missing test branch
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-cli.git
commit 7be99b5144e2a3b615e70cefa09f80232d799451
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Apr 8 09:06:58 2024 -0400
Add missing test branch
---
src/test/java/org/apache/commons/cli/UtilTest.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/test/java/org/apache/commons/cli/UtilTest.java b/src/test/java/org/apache/commons/cli/UtilTest.java
index beb57a5..8f24ff1 100644
--- a/src/test/java/org/apache/commons/cli/UtilTest.java
+++ b/src/test/java/org/apache/commons/cli/UtilTest.java
@@ -23,8 +23,11 @@ import static org.junit.jupiter.api.Assertions.assertNull;
import org.junit.jupiter.api.Test;
public class UtilTest {
+
@Test
public void testStripLeadingAndTrailingQuotes() {
+ assertNull(Util.stripLeadingAndTrailingQuotes(null));
+ assertEquals("", Util.stripLeadingAndTrailingQuotes(""));
assertEquals("foo", Util.stripLeadingAndTrailingQuotes("\"foo\""));
assertEquals("foo \"bar\"", Util.stripLeadingAndTrailingQuotes("foo \"bar\""));
assertEquals("\"foo\" bar", Util.stripLeadingAndTrailingQuotes("\"foo\" bar"));