Because sbt isn't writing out the escape sequences for its own logging, it is probably ScalaTest not checking the ansiCodesSupported value. You can explicitly pass ScalaTest's no-color option:
testOptions in Test += Tests.Arguments(TestFrameworks.ScalaTest, "-W")
The available options are described here:
http://www.scalatest.org/scaladoc-1.5/org/scalatest/tools/ScalaTestFramework.html
-Mark
ScalaTest is trying to not send out the ANSI codes if
ansiCodesSupported returns false:
logger.info(
if (logger.ansiCodesSupported && presentInColor)
colorizeLinesIndividually(text, ansiColor)
else
text
)
Don't have an easy way to reproduce the problem right now. Maybe we
can try it at ScalaDays.
Bill
> --
> You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
> To post to this group, send email to simple-b...@googlegroups.com.
> To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.
>
>
--
Bill Venners
Artima, Inc.
http://www.artima.com
Yes, that looks right, sorry. I will try to see if it is sbt's fault then.
-Mark
Yes, that looks right, sorry. I will try to see if it is sbt's fault then.
Yes, I've identified it as a bug in sbt, so please file away.
-Mark
> I wonder if the jansi dependency that was brought with jline can help
> (and I hope the issue is not related to the new jline). When jline
> starts it wraps its output stream in something that can handle ansi
> codes:
>
> http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/jline/src/main/java/scala/tools/jline/AnsiWindowsTerminal.java#L43
>
> See https://github.com/huynhjl/jansi/blob/master/src/main/java/org/fusesource/jansi/WindowsAnsiOutputStream.java
> for what's supported.
>
> You can sort of experiment it at the 2.9 console on win32:
>
> val out = new org.fusesource.jansi.WindowsAnsiOutputStream(System.out)
> out.write("\u001B[33mhi\u001B[0m\n".getBytes)
>
> May be this can be used to bring sbt colorization to Windows?
The long term plan is to use Scala's jline. There is a fair amount of work to do on it, though. jline2 introduced ThreadLocals (!) and a more intrusive shutdown hook if I remember correctly.
-Mark
Yes, I've identified it as a bug in sbt, so please file away.