[K/N] Test case for KT-50983
This commit is contained in:
@@ -5049,6 +5049,19 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("KT-50983", KonanDriverTest) {
|
||||
enabled = PlatformInfo.isWindows() && (project.target.family == Family.MINGW)
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
exec {
|
||||
commandLine UtilsKt.binaryFromToolchain(project, "windres")
|
||||
args "$projectDir/windows/KT-50983/File.rc", "-O", "coff", "-o", "$buildDir/File.res"
|
||||
}
|
||||
}
|
||||
source = "windows/KT-50983/main.kt"
|
||||
flags = ['-linker-option', "$buildDir/File.res"]
|
||||
}
|
||||
|
||||
standaloneTest("jsinterop_math") {
|
||||
doBeforeBuild {
|
||||
def jsinteropScript = isWindows() ? "jsinterop.bat" : "jsinterop"
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 5,0,0,1
|
||||
PRODUCTVERSION 5,0,0,1
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "080904E4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "CompanyName"
|
||||
VALUE "FileDescription", "Test Application"
|
||||
VALUE "FileVersion", "1.0"
|
||||
VALUE "InternalName", "Test"
|
||||
VALUE "OriginalFilename", "Test.exe"
|
||||
END
|
||||
END
|
||||
END
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
fun main() {
|
||||
println("hello")
|
||||
}
|
||||
@@ -498,6 +498,11 @@ fun Project.buildStaticLibrary(cSources: Collection<File>, output: File, objDir:
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.binaryFromToolchain(toolName: String): File {
|
||||
val platform = platformManager.platform(testTarget)
|
||||
return File("${platform.configurables.absoluteTargetToolchain}/bin/$toolName")
|
||||
}
|
||||
|
||||
// Workaround the deprecation warning from stdlib's appendln, which is reported because this module is compiled with API version 1.3.
|
||||
internal fun StringBuilder.appendln(o: Any?) {
|
||||
append(o)
|
||||
|
||||
Reference in New Issue
Block a user