JS backend: test for KT-6277

This commit is contained in:
Michael Nedzelsky
2014-11-19 19:09:50 +03:00
parent 8006f16e46
commit de2acc31ee
4 changed files with 31 additions and 1 deletions
@@ -19,7 +19,6 @@ package org.jetbrains.kotlin;
import com.intellij.openapi.util.io.FileUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.utils.fileUtils.FileUtilsPackage;
import org.jetbrains.k2js.test.rhino.RhinoFunctionResultChecker;
import org.jetbrains.k2js.test.rhino.RhinoUtils;
import org.junit.Rule;
@@ -127,6 +126,11 @@ public class AntTaskJsTest extends AntTaskBaseTest {
}
@Test
public void outputWithoutDirectory() throws Exception {
doJsAntTest();
}
@Test
public void noSrcParam() throws Exception {
doAntTest(FAILED);
@@ -0,0 +1,9 @@
OUT:
Buildfile: [TestData]/build.xml
build:
BUILD SUCCESSFUL
Total time: [time]
Return code: 0
@@ -0,0 +1,14 @@
<project name="Ant Task Test" default="build">
<target name="build">
<java dir="${temp}" fork="true" classname="org.jetbrains.jet.cli.js.K2JSCompiler">
<classpath>
<pathelement location="${kotlin.lib}/kotlin-compiler.jar"/>
<pathelement location="${kotlin.lib}/kotlin-runtime.jar"/>
</classpath>
<arg value="${test.data}/root1/foo.kt"/>
<arg value="-output"/>
<arg value="out.js"/>
<jvmarg value="-noverify"/>
</java>
</target>
</project>
@@ -0,0 +1,3 @@
package foo
fun box(): String = "OK"