From e5a02c4105ead54484d6e4a6a0121996ff0a9f6d Mon Sep 17 00:00:00 2001 From: Remko Popma Date: Fri, 24 Mar 2023 18:13:08 +0900 Subject: [PATCH] [#1975][#1976] minor enhancements bugfix --- .../src/test/java/picocli/AutoCompleteSystemExitTest.java | 4 ++-- .../src/test/java/picocli/HelpAnsiHeuristicsTest.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/picocli-tests-java9plus/src/test/java/picocli/AutoCompleteSystemExitTest.java b/picocli-tests-java9plus/src/test/java/picocli/AutoCompleteSystemExitTest.java index b248544bd..576e233f9 100644 --- a/picocli-tests-java9plus/src/test/java/picocli/AutoCompleteSystemExitTest.java +++ b/picocli-tests-java9plus/src/test/java/picocli/AutoCompleteSystemExitTest.java @@ -512,11 +512,11 @@ private String expectedCompletionScriptForNonDefault() { @BeforeAll static void disableAnsi() { - // Clear the globally cached jansiConsole value that might + // Clear the globally cached jansiInstalled value that might // have been set in a previous test to force the // Ansi#isJansiConsoleInstalled method to recalculate // the cached value. - Ansi.jansiConsole = null; + Ansi.jansiInstalled = null; } @Test diff --git a/picocli-tests-java9plus/src/test/java/picocli/HelpAnsiHeuristicsTest.java b/picocli-tests-java9plus/src/test/java/picocli/HelpAnsiHeuristicsTest.java index fdb8cec3b..899e22e40 100644 --- a/picocli-tests-java9plus/src/test/java/picocli/HelpAnsiHeuristicsTest.java +++ b/picocli-tests-java9plus/src/test/java/picocli/HelpAnsiHeuristicsTest.java @@ -613,11 +613,11 @@ public void testAnsiAutoJansiConsoleInstalledOverridesHintDisabled() throws Exce assertFalse(Ansi.isJansiConsoleInstalled()); - // Clear the globally cached jansiConsole value that might + // Clear the globally cached jansiInstalled value that might // have been set in a previous test to force the // Ansi#isJansiConsoleInstalled method to recalculate // the cached value. - Ansi.jansiConsole = null; + Ansi.jansiInstalled = null; AnsiConsole.systemInstall(); try { assertTrue(Ansi.isJansiConsoleInstalled()); @@ -634,7 +634,7 @@ public void testAnsiAutoHintDisabledOverridesHintEnabled() throws Exception { restoreSystemProperties(() -> { System.setProperty("os.name", "Windows"); - Ansi.jansiConsole = null; + Ansi.jansiInstalled = null; withEnvironmentVariable(ANSI_ENVIRONMENT_VARIABLES[0], null) .and(ANSI_ENVIRONMENT_VARIABLES[1], null) .and(ANSI_ENVIRONMENT_VARIABLES[2], null) @@ -695,7 +695,7 @@ public void testAnsiAutoDisabledIfNoTty() throws Exception { restoreSystemProperties(() -> { System.setProperty("os.name", "Windows"); - Ansi.jansiConsole = null; + Ansi.jansiInstalled = null; assertTrue(Ansi.isWindows()); assertFalse(Ansi.isPseudoTTY()); assertFalse(Ansi.isJansiConsoleInstalled());