[K/N][test] Move ZipTest to compiler/util-io tests

This is the last test in the Klib and was run separately.
Instead, it should be located with 'kotlin-util-io' project which it tests


Merge-request: KT-MR-13978
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
This commit is contained in:
Pavel Punegov
2024-01-23 11:01:58 +00:00
committed by Space Team
parent 3dd4a0d868
commit cdb6a06e49
2 changed files with 3 additions and 12 deletions
@@ -1,15 +1,13 @@
/* /*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2024 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. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
package org.jetbrains.kotlin.cli.klib.test package org.jetbrains.kotlin.cli.klib
import org.jetbrains.kotlin.konan.file.File import org.jetbrains.kotlin.konan.file.File
import org.jetbrains.kotlin.konan.file.unzipTo import org.jetbrains.kotlin.konan.file.unzipTo
import org.jetbrains.kotlin.konan.file.use import org.jetbrains.kotlin.konan.file.use
import org.jetbrains.kotlin.library.impl.javaFile
import org.junit.After
import org.junit.Before import org.junit.Before
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
@@ -64,7 +62,7 @@ class ZipTest {
} }
private fun createMaliciousArchive(file: File) { private fun createMaliciousArchive(file: File) {
ZipOutputStream(FileOutputStream(file.javaFile())).use { ZipOutputStream(FileOutputStream(java.io.File(file.path))).use {
it.putNextEntry(ZipEntry("../definitelySafe.txt")) it.putNextEntry(ZipEntry("../definitelySafe.txt"))
it.closeEntry() it.closeEntry()
} }
-7
View File
@@ -23,11 +23,4 @@ dependencies {
implementation project(":kotlin-stdlib") implementation project(":kotlin-stdlib")
implementation project(path: ':kotlin-native:backend.native', configuration: 'cli_bcApiElements') implementation project(path: ':kotlin-native:backend.native', configuration: 'cli_bcApiElements')
implementation project(":kotlin-native:utilities:basic-utils") implementation project(":kotlin-native:utilities:basic-utils")
testImplementation libs.junit4
testImplementation RepoDependencies.kotlinTest(project, "junit")
}
test {
dependsOn 'cleanTest'
// Specify a path to the distribution that is used in the tests.
} }