File tree Expand file tree Collapse file tree
core/src/test/java/org/jetbrains/ktfmt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package org.jetbrains.ktfmt
33import com.facebook.ktfmt.format.Formatter
44import com.facebook.ktfmt.format.FormattingOptions
55import com.facebook.ktfmt.format.TrailingCommaManagementStrategy
6+ import java.net.URI
67import java.nio.file.Path
78import kotlin.io.path.extension
89import kotlin.io.path.isDirectory
@@ -12,7 +13,6 @@ import kotlin.io.path.name
1213import kotlin.io.path.nameWithoutExtension
1314import kotlin.io.path.readText
1415import kotlin.io.path.writeText
15- import kotlin.io.resolve
1616import org.junit.jupiter.api.Assertions.assertEquals
1717import org.junit.jupiter.api.DynamicContainer
1818import org.junit.jupiter.api.DynamicNode
@@ -62,7 +62,7 @@ abstract class FormatterTestFactory(
6262 // Without this, neither 'overwrite' nor navigation in IJ will work
6363 val root = run {
6464 val location = javaClass.protectionDomain?.codeSource?.location!!
65- val root = location.toURI().path .substringBefore(" build/classes/kotlin/test" )
65+ val root = URI ( location.toURI().toString() .substringBefore(" build/classes/kotlin/test" ) )
6666 Path .of(root).resolve(" src/test/resources/cases" )
6767 }
6868 }
You can’t perform that action at this time.
0 commit comments