Skip to content

Commit

Permalink
[#2228] update test
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Apr 13, 2024
1 parent ed43e9a commit a5fdd30
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/test/java/picocli/Issue2228.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ public int handleExecutionException(Exception ex, CommandLine exCmdLine, ParseRe
return 0;
}
});
assertSame(commandLine.getParseResult(), caughtParseResult[0]);
commandLine.execute("-x");
assertNotNull(caughtParseResult[0]);

ParseResult after = commandLine.getParseResult();
assertFalse(after.matchedArgs().isEmpty());
assertFalse(after.matchedOptions().isEmpty());

assertFalse(caughtParseResult[0].matchedArgs().isEmpty());
assertFalse(caughtParseResult[0].matchedOptions().isEmpty());
}
}

0 comments on commit a5fdd30

Please sign in to comment.