Skip to content

Commit

Permalink
[#738] added test
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Jun 30, 2019
1 parent d2b4ed2 commit 25c51ef
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/test/java/picocli/ArgSplitTest.java
Expand Up @@ -398,6 +398,22 @@ class Example {
}
}

@Test
public void testParseQuotedOptionsWithNestedQuotedValuesGivesError2() {
class Example {
@Option(names = "-x", split = ",")
List<String> parts;
}
String[] args = {"\"-x=a,b,\"c,d,e\",f\""};
Example example = new Example();
try {
new CommandLine(example).setTrimQuotes(true).parseArgs(args);
fail("Expected exception");
} catch (Exception ex) {
assertEquals("Unmatched argument at index 0: '\"-x=a,b,\"c,d,e\",f\"'", ex.getMessage());
}
}


// test https://github.com/remkop/picocli/issues/379
@Test
Expand Down

0 comments on commit 25c51ef

Please sign in to comment.