Skip to content

Commit 7bc0a25

Browse files
committed
Use anchor to locate correct test resource directory
1 parent b85bc6c commit 7bc0a25

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

adapter/src/test/kotlin/org/javacs/ktda/DebugAdapterTestFixture.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ abstract class DebugAdapterTestFixture(
1515
relativeWorkspaceRoot: String,
1616
private val mainClass: String
1717
) : IDebugProtocolClient {
18-
val absoluteWorkspaceRoot: Path = Paths.get(DebugAdapterTestFixture::class.java.getResource("/").toURI()).resolve(relativeWorkspaceRoot)
18+
val absoluteWorkspaceRoot: Path = Paths.get(DebugAdapterTestFixture::class.java.getResource("/Anchor.txt").toURI()).parent.resolve(relativeWorkspaceRoot)
1919
val debugAdapter: KotlinDebugAdapter = JDILauncher()
2020
.let(::KotlinDebugAdapter)
2121
.also {

adapter/src/test/resources/Anchor.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Anchor for finding the test/resources directory.

0 commit comments

Comments
 (0)