File tree 4 files changed +27
-1
lines changed
src/test/kotlin/com/compiler/server
4 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ task called `kotlinDependency`:
163
163
NOTE: If the library you're adding uses reflection, accesses the file system, or performs any other type of
164
164
security-sensitive operations, don't forget to
165
165
configure
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 )
167
167
. [ Click here] ( https://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html ) for more information
168
168
about * Java Security Policy* .
169
169
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ dependencies {
103
103
kotlinDependency(" org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion " )
104
104
kotlinDependency(" org.jetbrains.kotlin:kotlin-test:$kotlinVersion " )
105
105
kotlinDependency(" org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.3" )
106
+ kotlinDependency(" org.jetbrains.kotlinx:kotlinx-io-core:0.5.1" )
106
107
kotlinDependency(" org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4" )
107
108
kotlinDependency(" org.jetbrains.kotlinx:kotlinx-datetime:0.6.0-RC.2" )
108
109
kotlinJsDependency(" org.jetbrains.kotlin:kotlin-stdlib-js:$kotlinVersion " )
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ grant {
24
24
permission java.io.FilePermission "%%GENERATED%%/*", "read";
25
25
permission java.util.PropertyPermission "com.fasterxml.jackson.core.util.BufferRecyclers.trackReusableBuffers", "read";
26
26
permission java.util.PropertyPermission "kotlin.collections.*", "read";
27
+ permission java.util.PropertyPermission "kotlinx.io.*", "read";
27
28
};
28
29
29
30
grant 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