diff --git a/main/src/test/scala/sbt/internal/parser/ErrorSpec.scala b/main/src/test/scala/sbt/internal/parser/ErrorSpec.scala index a79fd91f7..66d9dfb3e 100644 --- a/main/src/test/scala/sbt/internal/parser/ErrorSpec.scala +++ b/main/src/test/scala/sbt/internal/parser/ErrorSpec.scala @@ -19,7 +19,7 @@ class ErrorSpec extends AbstractSpec { "Parser " should { "contains file name and line number" in { - val rootPath = getClass.getClassLoader.getResource("").getPath + "/error-format/" + val rootPath = getClass.getResource("/error-format/").getPath println(s"Reading files from: $rootPath") foreach(new File(rootPath).listFiles) { file => print(s"Processing ${file.getName}: ") diff --git a/main/src/test/scala/sbt/internal/parser/NewFormatSpec.scala b/main/src/test/scala/sbt/internal/parser/NewFormatSpec.scala index ee45ffd2e..6e0e02ae6 100644 --- a/main/src/test/scala/sbt/internal/parser/NewFormatSpec.scala +++ b/main/src/test/scala/sbt/internal/parser/NewFormatSpec.scala @@ -22,7 +22,7 @@ class NewFormatSpec extends AbstractSpec { "New Format " should { "Handle lines " in { - val rootPath = getClass.getClassLoader.getResource("").getPath + "/new-format/" + val rootPath = getClass.getResource("/new-format").getPath println(s"Reading files from: $rootPath") val allFiles = new File(rootPath).listFiles.toList foreach(allFiles) { path => diff --git a/main/src/test/scala/sbt/internal/parser/SessionSettingsSpec.scala b/main/src/test/scala/sbt/internal/parser/SessionSettingsSpec.scala index 4db2e158f..0e97d6c01 100644 --- a/main/src/test/scala/sbt/internal/parser/SessionSettingsSpec.scala +++ b/main/src/test/scala/sbt/internal/parser/SessionSettingsSpec.scala @@ -18,7 +18,7 @@ import scala.io.Source import SessionSettings.SessionSetting abstract class AbstractSessionSettingsSpec(folder: String) extends AbstractSpec { - protected val rootPath = getClass.getClassLoader.getResource("").getPath + folder + protected val rootPath = getClass.getResource("/" + folder).getPath println(s"Reading files from: $rootPath") protected val rootDir = new File(rootPath)