Skip to content

Commit

Permalink
Ensure ANSI is disabled in TracerTest regardless of environment (issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dwalluck authored and remkop committed Sep 10, 2020
1 parent ccd023e commit feb41ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/java/picocli/TracerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.ProvideSystemProperty;
import org.junit.contrib.java.lang.system.RestoreSystemProperties;
import org.junit.rules.TestRule;

Expand All @@ -23,6 +24,9 @@ public class TracerTest {
@Rule
public final TestRule restoreSystemProperties = new RestoreSystemProperties();

@Rule
public final ProvideSystemProperty ansiOFF = new ProvideSystemProperty("picocli.ansi", "false");

private static void clearBuiltInTracingCache() throws Exception {
Field field = Class.forName("picocli.CommandLine$BuiltIn").getDeclaredField("traced");
field.setAccessible(true);
Expand Down

0 comments on commit feb41ab

Please sign in to comment.