OpenJDK / jdk9 / jdk9 / jdk
changeset 13926:cc97013c9cca
8131913: jdk/internal/jline/console/StripAnsiTest.java can't run in the background
Summary: Avoid using a real terminal in tests.
Reviewed-by: rfield
author | jlahoda |
---|---|
date | Mon, 21 Mar 2016 10:27:50 +0100 |
parents | 88577677aec9 |
children | dd2ab8b2b9f2 fbe70dc61f3b |
files | test/jdk/internal/jline/console/StripAnsiTest.java |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/test/jdk/internal/jline/console/StripAnsiTest.java Sun Mar 20 07:35:20 2016 +0000 +++ b/test/jdk/internal/jline/console/StripAnsiTest.java Mon Mar 21 10:27:50 2016 +0100 @@ -23,14 +23,16 @@ /** * @test - * @bug 8080679 - * @modules jdk.internal.le/jdk.internal.jline.console + * @bug 8080679 8131913 + * @modules jdk.internal.le/jdk.internal.jline + * jdk.internal.le/jdk.internal.jline.console * @summary Verify ConsoleReader.stripAnsi strips escape sequences from its input correctly. */ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.lang.reflect.Method; +import jdk.internal.jline.UnsupportedTerminal; import jdk.internal.jline.console.ConsoleReader; public class StripAnsiTest { @@ -41,7 +43,7 @@ void run() throws Exception { ByteArrayInputStream in = new ByteArrayInputStream(new byte[0]); ByteArrayOutputStream out = new ByteArrayOutputStream(); - ConsoleReader reader = new ConsoleReader(in, out); + ConsoleReader reader = new ConsoleReader(in, out, new UnsupportedTerminal()); String withAnsi = "0\033[s1\033[2J2\033[37;4m3"; String expected = "0123";