Send compiler output to stderr instead of stdout
Test only stderr in kotlinc test now and move the '-script' test to integration tests where both stdout and stderr is tested
This commit is contained in:
@@ -69,4 +69,8 @@ public class CompilerSmokeTest extends KotlinIntegrationTestBase {
|
||||
runCompiler("test.compile", "-src", "test.kt", "-jar", jar);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void simpleScript() throws Exception {
|
||||
runCompiler("script", "-script", "script.kts", "hi", "there");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,13 +62,18 @@ public abstract class KotlinIntegrationTestBase {
|
||||
new File(getKotlinProjectHome(), "compiler" + File.separator + "integration-tests" + File.separator + "testData");
|
||||
testDataDir = new File(baseTestDataDir, description.getMethodName());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
static {
|
||||
System.setProperty("java.awt.headless", "true");
|
||||
}
|
||||
|
||||
protected int runCompiler(String logName, String... arguments) throws Exception {
|
||||
File lib = getCompilerLib();
|
||||
|
||||
String classpath = lib.getAbsolutePath() + File.separator + "kotlin-compiler.jar";
|
||||
String classpath = lib.getAbsolutePath() + File.separator +
|
||||
"kotlin-compiler.jar" + File.pathSeparator +
|
||||
getKotlinRuntimePath();
|
||||
|
||||
Collection<String> javaArgs = new ArrayList<String>();
|
||||
javaArgs.add("-cp");
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
OUT:
|
||||
ERROR: [TestData]/hello.kt: (4, 5) Unresolved reference: a
|
||||
|
||||
ERR:
|
||||
ERROR: [TestData]/hello.kt: (4, 5) Unresolved reference: a
|
||||
exec() finished with COMPILATION_ERROR return code
|
||||
|
||||
Return code: 1
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
OUT:
|
||||
hi
|
||||
there
|
||||
|
||||
Return code: 0
|
||||
@@ -0,0 +1,3 @@
|
||||
for (arg in args) {
|
||||
println(arg)
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
OUT:
|
||||
ERROR: [TestData]/test.kt: (4, 20) Expecting an element
|
||||
|
||||
ERR:
|
||||
ERROR: [TestData]/test.kt: (4, 20) Expecting an element
|
||||
exec() finished with COMPILATION_ERROR return code
|
||||
|
||||
Return code: 1
|
||||
|
||||
Reference in New Issue
Block a user