Resolve "If the CLI is invoked without any parameter, the usage is shown twice"

This commit is contained in:
Philip Helger 2025-08-27 18:14:09 +02:00 committed by Renzo Kottmann
parent 22910c1ca0
commit 5e57c3e978
2 changed files with 11 additions and 4 deletions

View file

@ -84,6 +84,14 @@ public class CommandlineApplicationTest {
assertThat(outputLines.stream().filter(l -> l.startsWith(CommandLineOptions.SYNOSIS_HEADING))).hasSize(1);
}
@Test
public void testNoArguments() {
final String[] args = {};
CommandLineApplication.mainProgram(args);
assertThat(CommandLine.getErrorOutput()).isNotEmpty();
checkForHelp(CommandLine.getErrorLines());
}
@Test
public void testRequiredScenarioFile() {
final String[] args = { "arguments", "egal welche", "argumente drin sind" };