Don't output error for "kotlinc -version"
#KT-9676 Fixed
This commit is contained in:
@@ -26,6 +26,7 @@ import kotlin.io.FilesKt;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.cli.common.CLICompiler;
|
||||
import org.jetbrains.kotlin.cli.common.ExitCode;
|
||||
import org.jetbrains.kotlin.cli.common.KotlinVersion;
|
||||
import org.jetbrains.kotlin.cli.js.K2JSCompiler;
|
||||
import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler;
|
||||
import org.jetbrains.kotlin.load.java.JvmAbi;
|
||||
@@ -72,7 +73,8 @@ public class CliBaseTest {
|
||||
String normalizedOutputWithoutExitCode = pureOutput
|
||||
.replace(new File(testDataDir).getAbsolutePath(), "$TESTDATA_DIR$")
|
||||
.replace("expected ABI version is " + JvmAbi.VERSION, "expected ABI version is $ABI_VERSION$")
|
||||
.replace("\\", "/");
|
||||
.replace("\\", "/")
|
||||
.replace(KotlinVersion.VERSION, "$VERSION$");
|
||||
|
||||
return removePerfOutput(normalizedOutputWithoutExitCode) + exitCode;
|
||||
}
|
||||
|
||||
@@ -223,6 +223,12 @@ public class KotlincExecutableTestGenerated extends AbstractKotlincExecutableTes
|
||||
doJvmTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("version.args")
|
||||
public void testVersion() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/version.args");
|
||||
doJvmTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("warningsInDummy.args")
|
||||
public void testWarningsInDummy() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/warningsInDummy.args");
|
||||
@@ -364,6 +370,12 @@ public class KotlincExecutableTestGenerated extends AbstractKotlincExecutableTes
|
||||
doJsTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("version.args")
|
||||
public void testVersion() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/version.args");
|
||||
doJsTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("withFolderAsLib.args")
|
||||
public void testWithFolderAsLib() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/withFolderAsLib.args");
|
||||
|
||||
Reference in New Issue
Block a user