Make dependency-graph scripted test Windows-proof

This commit is contained in:
Alexandre Archambault 2020-09-14 19:00:25 +02:00
parent a7acf35d0c
commit 29d957604e
1 changed files with 3 additions and 2 deletions

View File

@ -7,11 +7,12 @@ libraryDependencies += {
lazy val whatDependsOnCheck = TaskKey[Unit]("whatDependsOnCheck")
import java.nio.file.{Files, Paths}
import CoursierPlugin.autoImport._
whatDependsOnCheck := {
val result = (coursierWhatDependsOn in Compile).toTask(" log4j:log4j").value
val file = new File("whatDependsOnResult.log")
val expected = IO.read(file).toString
.replace(System.lineSeparator(), "\n")
val expected = new String(Files.readAllBytes(Paths.get("whatDependsOnResult.log")), "UTF-8")
assert(expected == result, s"Expected '$expected', got '$result'")
}