Skip to content

Commit feb41ab

Browse files
dwalluckremkop
authored andcommitted
Ensure ANSI is disabled in TracerTest regardless of environment (issue #1103)
1 parent ccd023e commit feb41ab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/java/picocli/TracerTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import org.junit.Rule;
44
import org.junit.Test;
5+
import org.junit.contrib.java.lang.system.ProvideSystemProperty;
56
import org.junit.contrib.java.lang.system.RestoreSystemProperties;
67
import org.junit.rules.TestRule;
78

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

27+
@Rule
28+
public final ProvideSystemProperty ansiOFF = new ProvideSystemProperty("picocli.ansi", "false");
29+
2630
private static void clearBuiltInTracingCache() throws Exception {
2731
Field field = Class.forName("picocli.CommandLine$BuiltIn").getDeclaredField("traced");
2832
field.setAccessible(true);

0 commit comments

Comments
 (0)