[Gradle, tests] Fix native compiler arguments test for Windows

This commit is contained in:
Ilya Matveev
2020-02-27 19:52:23 +07:00
parent 0b9106b0f8
commit f53b059410
@@ -2525,7 +2525,14 @@ class NewMultiplatformIT : BaseGradleIT() {
@Test
fun testNativeArgsWithSpaces() = with(Project("sample-lib", directoryPrefix = "new-mpp-lib-and-app")) {
setupWorkingDir()
val fileWithSpacesInPath = projectDir.resolve("src/commonMain/kotlin/path with spaces and special symbols like \"")
val compilcatedDirectoryName = if (HostManager.hostIsMingw) {
// Windows doesn't allow creating a file with " in its name.
"path with spaces"
} else {
"path with spaces and \""
}
val fileWithSpacesInPath = projectDir.resolve("src/commonMain/kotlin/$compilcatedDirectoryName")
.apply { mkdirs() }
.resolve("B.kt")
fileWithSpacesInPath.writeText("fun foo() = 42")