Skip to content

Commit

Permalink
fix build problem on JDK 11
Browse files Browse the repository at this point in the history
  • Loading branch information
SethTisue authored and adriaanm committed Oct 17, 2018
1 parent ed5ddcb commit 1d55f7b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/src/test/scala/annotations/run/Repl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class Repl extends FunSuite {
s.usejavacp.value = false
s.classpath.value = sys.props("sbt.paths.tests.classpath")
s.plugin.value = List(sys.props("sbt.paths.plugin.jar"))
val lines = ILoop.runForTranscript(code, s).lines.toList
// Predef.augmentString = work around scala/bug#11125 on JDK 11
val lines = Predef.augmentString(ILoop.runForTranscript(code, s)).lines.toList
// TODO: I don't know why but setting replProps.colorOk to false doesn't help.
// I don't have time to figure out what's going on, so I'll do simple string replacement.
def cleanup(line: String) = line.replace(MAGENTA, "").replace(RESET, "").trim
Expand Down Expand Up @@ -80,4 +81,4 @@ class Repl extends FunSuite {
assert(!printout.contains("defined class NonThingy"))
assert(!printout.contains("defined object NonThingy"))
}
}
}

0 comments on commit 1d55f7b

Please sign in to comment.