JS backend: test for KT-6277
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user