Skip to content

Commit 952fb20

Browse files
committed
Strip colors from output in TestREPL
1 parent bce6abd commit 952fb20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test/TestREPL.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class TestREPL(script: String) extends REPL {
3838
out.close()
3939
val printed = out.toString
4040
val transcript = printed.drop(printed.indexOf(config.prompt))
41-
if (transcript.toString != script) {
41+
val transcriptNoColors = transcript.toString.replaceAll("\u001B\\[[;\\d]*m", "")
42+
if (transcriptNoColors != script) {
4243
println("input differs from transcript:")
4344
println(transcript)
4445
assert(false)

0 commit comments

Comments
 (0)