Ensure ANSI is disabled in ManPageGeneratorTest regardless of environment (issue #1103)

This commit is contained in:
David Walluck
2020-09-10 22:01:28 -04:00
committed by Remko Popma
parent af6f290bba
commit b8dcc00c6c

View File

@@ -1,6 +1,10 @@
package picocli.codegen.docgen.manpage;
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;
import picocli.CommandLine;
import picocli.CommandLine.ArgGroup;
import picocli.CommandLine.Command;
@@ -24,6 +28,11 @@ import java.util.concurrent.Callable;
import static org.junit.Assert.*;
public class ManPageGeneratorTest {
@Rule
public final TestRule restoreSystemProperties = new RestoreSystemProperties();
@Rule
public final ProvideSystemProperty ansiOFF = new ProvideSystemProperty("picocli.ansi", "false");
@Test
public void generateManPage() throws IOException {