8131913: jdk/internal/jline/console/StripAnsiTest.java can't run in the background
authorjlahoda
Mon, 21 Mar 2016 10:27:50 +0100
changeset 36644 dae617cceb1b
parent 36643 6e0a015cd8c8
child 36645 dd51a5761eec
child 36656 a8cad521af47
8131913: jdk/internal/jline/console/StripAnsiTest.java can't run in the background Summary: Avoid using a real terminal in tests. Reviewed-by: rfield
jdk/test/jdk/internal/jline/console/StripAnsiTest.java
--- a/jdk/test/jdk/internal/jline/console/StripAnsiTest.java	Sun Mar 20 07:35:20 2016 +0000
+++ b/jdk/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";