mirror of https://github.com/sbt/sbt.git
Add regression test for #8345
This commit is contained in:
parent
862884b330
commit
4bcf866193
|
|
@ -0,0 +1,6 @@
|
|||
val scalatest = "org.scalatest" %% "scalatest" % "3.2.19"
|
||||
|
||||
scalaVersion := "3.7.3"
|
||||
Test / fork := true
|
||||
libraryDependencies += scalatest % Test
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
test resource content
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
import org.scalatest.funsuite.AnyFunSuite
|
||||
|
||||
class ResourceTest extends AnyFunSuite {
|
||||
test("access main resource from forked test") {
|
||||
val loader = Thread.currentThread().getContextClassLoader()
|
||||
val resource = loader.getResource("foo")
|
||||
assert(resource != null, "Resource 'foo' from src/main/resources should be accessible in forked test execution")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
> test
|
||||
|
||||
Loading…
Reference in New Issue