Skip to content

Commit

Permalink
[#1457] add failing test for @files with quoted option parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Nov 13, 2021
1 parent dde8063 commit 4fed17f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/java/picocli/AtFileTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -799,4 +799,18 @@ class App {

assertEquals(Arrays.asList("1111", "-v", "2222", ";3333"), parseResult.expandedArgs());
}

@Ignore
@Test
public void testIssue1457() {
class Issue1457 {
@Option(names = { "-p" })
String prefix = "";
}
File atFile = findFile("/argfile-issue1457.txt");
Issue1457 obj = new Issue1457();
CommandLine cmd = new CommandLine(obj);
cmd.parseArgs("@" + atFile.getAbsolutePath());
assertEquals("PREFIX", obj.prefix);
}
}
2 changes: 2 additions & 0 deletions src/test/resources/argfile-issue1457.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#sub -p="PREFIX"
-p="PREFIX"

0 comments on commit 4fed17f

Please sign in to comment.