File tree Expand file tree Collapse file tree 4 files changed +27
-1
lines changed
src/test/kotlin/com/compiler/server Expand file tree Collapse file tree 4 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ task called `kotlinDependency`:
163163NOTE: If the library you're adding uses reflection, accesses the file system, or performs any other type of
164164security-sensitive operations, don't forget to
165165configure
166- the [ executors .policy] ( https://github.com/AlexanderPrednota /kotlin-compiler-server/blob/master/executors .policy )
166+ the [ executor .policy] ( https://github.com/JetBrains /kotlin-compiler-server/blob/master/executor .policy )
167167. [ Click here] ( https://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html ) for more information
168168about * Java Security Policy* .
169169
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ dependencies {
103103 kotlinDependency(" org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion " )
104104 kotlinDependency(" org.jetbrains.kotlin:kotlin-test:$kotlinVersion " )
105105 kotlinDependency(" org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.3" )
106+ kotlinDependency(" org.jetbrains.kotlinx:kotlinx-io-core:0.5.1" )
106107 kotlinDependency(" org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4" )
107108 kotlinDependency(" org.jetbrains.kotlinx:kotlinx-datetime:0.6.0-RC.2" )
108109 kotlinJsDependency(" org.jetbrains.kotlin:kotlin-stdlib-js:$kotlinVersion " )
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ grant {
2424 permission java.io.FilePermission "%%GENERATED%%/*", "read";
2525 permission java.util.PropertyPermission "com.fasterxml.jackson.core.util.BufferRecyclers.trackReusableBuffers", "read";
2626 permission java.util.PropertyPermission "kotlin.collections.*", "read";
27+ permission java.util.PropertyPermission "kotlinx.io.*", "read";
2728};
2829
2930grant codeBase "file:%%LIB_DIR%%/executors.jar"{
Original file line number Diff line number Diff line change 1+ package com.compiler.server
2+
3+ import com.compiler.server.base.BaseExecutorTest
4+ import org.junit.jupiter.api.Test
5+
6+ class IORunnerTest : BaseExecutorTest () {
7+
8+ @Test
9+ fun `kotlinx io basic test` () {
10+ run (
11+ code = """
12+ import kotlinx.io.*
13+
14+ fun main() {
15+ val source = "Hello world".byteInputStream().asSource()
16+ val buffered = source.buffered()
17+ println(buffered.readString())
18+
19+ }
20+ """ .trimIndent(),
21+ contains = " <outStream>Hello world"
22+ )
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments