aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-05-12 13:40:16 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-05-12 13:40:16 +0200
commit952fb20f37f8350bd31ae1fd4f06fc51bda099c3 (patch)
treeb4d83d2448ff042af41bf28173ba3afcc7e4272b
parentbce6abd2fad9aeb54d263803f729ee53b1f49597 (diff)
downloaddotty-952fb20f37f8350bd31ae1fd4f06fc51bda099c3.tar.gz
dotty-952fb20f37f8350bd31ae1fd4f06fc51bda099c3.tar.bz2
dotty-952fb20f37f8350bd31ae1fd4f06fc51bda099c3.zip
Strip colors from output in TestREPL
-rw-r--r--test/test/TestREPL.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test/TestREPL.scala b/test/test/TestREPL.scala
index 0fe05794f..ab31af636 100644
--- a/test/test/TestREPL.scala
+++ b/test/test/TestREPL.scala
@@ -38,7 +38,8 @@ class TestREPL(script: String) extends REPL {
out.close()
val printed = out.toString
val transcript = printed.drop(printed.indexOf(config.prompt))
- if (transcript.toString != script) {
+ val transcriptNoColors = transcript.toString.replaceAll("\u001B\\[[;\\d]*m", "")
+ if (transcriptNoColors != script) {
println("input differs from transcript:")
println(transcript)
assert(false)