[klib] Fix klib printer tests
This commit is contained in:
@@ -58,4 +58,11 @@ test {
|
||||
dependsOn 'cleanTest'
|
||||
systemProperty('konan.home', getProperty("konan.home"))
|
||||
dependsOn konanArtifacts.collect { it.getByTarget('host') }
|
||||
if (useCustomDist) {
|
||||
// Use the klib utility from the distribution
|
||||
def distClasspath = fileTree("${project.getProperty("konan.home")}/konan/lib") {
|
||||
include "**/*.jar"
|
||||
}
|
||||
classpath = distClasspath + sourceSets.test.runtimeClasspath - sourceSets.main.runtimeClasspath
|
||||
}
|
||||
}
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
package org.jetbrains.kotlin.cli.klib.test
|
||||
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import kotlin.test.*
|
||||
import org.jetbrains.kotlin.cli.klib.*
|
||||
import org.jetbrains.kotlin.konan.target.Distribution
|
||||
import org.jetbrains.kotlin.konan.target.HostManager
|
||||
import org.jetbrains.kotlin.preprocessor.convertLineSeparators
|
||||
import java.nio.file.Paths
|
||||
|
||||
class ContentsTest {
|
||||
@@ -35,8 +35,8 @@ class ContentsTest {
|
||||
println(output.trim().toString())
|
||||
}
|
||||
assertEquals(
|
||||
expected().convertLineSeparators(),
|
||||
output.trim().toString().convertLineSeparators(),
|
||||
StringUtil.convertLineSeparators(expected()),
|
||||
StringUtil.convertLineSeparators(output.trim().toString()),
|
||||
"klib contents test failed for library: $library"
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user