Skip to content

Commit

Permalink
[#1975][#1976] minor enhancements bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Mar 24, 2023
1 parent 22c2deb commit e5a02c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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)
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit e5a02c4

Please sign in to comment.