K2 Scripting: add support for result field

This commit is contained in:
Ilya Chernikov
2023-04-28 17:11:56 +02:00
committed by Space Team
parent 6c7751b0af
commit d24fc3b581
20 changed files with 87 additions and 25 deletions
@@ -120,7 +120,7 @@ class MainKtsIT {
@OptIn(ExperimentalPathApi::class)
@Test
fun testCacheWithFileLocation() = expectTestToFailOnK2 {
fun testCacheWithFileLocation() {
val scriptPath = File("$TEST_DATA_ROOT/script-file-location-default.main.kts").absolutePath
val cache = createTempDirectory("main.kts.test")
val expectedTestOutput = listOf(Regex.escape(scriptPath))
@@ -78,7 +78,7 @@ class MainKtsTest {
}
@Test
fun testResolveRuntimeDeps() = expectTestToFailOnK2 {
fun testResolveRuntimeDeps() {
val resOk = evalFile(File("$TEST_DATA_ROOT/resolve-with-runtime.main.kts"))
assertSucceeded(resOk)
@@ -179,7 +179,7 @@ class MainKtsTest {
}
@Test
fun testScriptFileLocationDefaultVariable() = expectTestToFailOnK2 {
fun testScriptFileLocationDefaultVariable() {
val resOk = evalFile(File("$TEST_DATA_ROOT/script-file-location-default.main.kts"))
assertSucceeded(resOk)
val resultValue = resOk.valueOrThrow().returnValue
@@ -192,7 +192,7 @@ class MainKtsTest {
}
@Test
fun testScriptFileLocationCustomizedVariable() = expectTestToFailOnK2 {
fun testScriptFileLocationCustomizedVariable() {
val resOk = evalFile(File("$TEST_DATA_ROOT/script-file-location-customized.main.kts"))
assertSucceeded(resOk)
val resultValue = resOk.valueOrThrow().returnValue