From 548fb693ad00a924a71e04d07c5f90b4f5d84014 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Mon, 28 Aug 2023 11:17:00 +0200 Subject: [PATCH] Disable Picocli's usage help auto width computation Fixes #3419 --- .../java/org/junit/platform/console/options/MainCommand.java | 2 +- .../java/org/junit/platform/console/ConsoleLauncherTests.java | 3 +-- .../java/platform/tooling/support/tests/StandaloneTests.java | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/MainCommand.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/MainCommand.java index 610094564b9e..284ff655b168 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/MainCommand.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/MainCommand.java @@ -33,7 +33,7 @@ sortOptions = false, // usageHelpWidth = 95, // showAtFileInUsageHelp = true, // - usageHelpAutoWidth = true, // + usageHelpAutoWidth = false, // https://github.com/remkop/picocli/issues/1104 description = "Launches the JUnit Platform for test discovery and execution.", // footerHeading = "%n", // footer = "For more information, please refer to the JUnit User Guide at%n" // diff --git a/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherTests.java b/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherTests.java index 37d9c9349a73..70e6bd21d536 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherTests.java @@ -47,8 +47,7 @@ void displayBanner(String command) { var consoleLauncher = new ConsoleLauncher(ConsoleTestExecutor::new, printSink, printSink); consoleLauncher.run(command); - assertThat(stringWriter.toString()).contains( - "Thanks for using JUnit! Support its development at https://junit.org/sponsoring"); + assertThat(stringWriter.toString()).contains("Thanks for using JUnit!"); } @ParameterizedTest(name = "{0}") diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/StandaloneTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/StandaloneTests.java index eb8eb20254f2..3b9f4524b680 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/StandaloneTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/StandaloneTests.java @@ -66,7 +66,7 @@ void listAllObservableEngines() { .setTool(new Java()) // .setProject("standalone") // .addArguments("-jar", MavenRepo.jar("junit-platform-console-standalone")) // - .addArguments("engines", "--disable-banner").build() // + .addArguments("engines", "--disable-ansi-colors", "--disable-banner").build() // .run(false); assertEquals(0, result.getExitCode(), String.join("\n", result.getOutputLines("out")));