Kapt: Add tests for the command-line 'kapt' tool
This commit is contained in:
+7
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.cli.common.arguments
|
||||
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import java.io.File
|
||||
import java.io.FileNotFoundException
|
||||
import java.io.IOException
|
||||
@@ -35,6 +36,12 @@ fun preprocessCommandLineArguments(args: List<String>, errors: ArgumentParseErro
|
||||
}
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
fun readArgumentsFromArgFile(content: String): List<String> {
|
||||
val reader = content.reader()
|
||||
return generateSequence { reader.parseNextArgument() }.toList()
|
||||
}
|
||||
|
||||
private fun File.expand(errors: ArgumentParseErrors): List<String> {
|
||||
return try {
|
||||
bufferedReader(Charsets.UTF_8).use {
|
||||
|
||||
Reference in New Issue
Block a user