K2JS: fix KT-5639 Exception in kotlin-js when directory is given instead of output file
#KT-5639 Fixed
This commit is contained in:
@@ -174,6 +174,12 @@ public class KotlincExecutableTestGenerated extends AbstractKotlincExecutableTes
|
||||
doJsTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("outputIsDirectory.args")
|
||||
public void testOutputIsDirectory() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/outputIsDirectory.args");
|
||||
doJsTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("outputPostfixFileNotFound.args")
|
||||
public void testOutputPostfixFileNotFound() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/outputPostfixFileNotFound.args");
|
||||
|
||||
@@ -30,18 +30,25 @@ public class K2JsCliTest extends CliBaseTest {
|
||||
Assert.assertTrue(new File(tmpdir.getTmpDir(), "out.js").isFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void outputIsDirectory() throws Exception {
|
||||
executeCompilerCompareOutputJS();
|
||||
|
||||
Assert.assertFalse(new File(tmpdir.getTmpDir(), "out.js").exists());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void outputPrefixFileNotFound() throws Exception {
|
||||
executeCompilerCompareOutputJS();
|
||||
|
||||
Assert.assertFalse(new File(tmpdir.getTmpDir(), "out.js").isFile());
|
||||
Assert.assertFalse(new File(tmpdir.getTmpDir(), "out.js").exists());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void outputPostfixFileNotFound() throws Exception {
|
||||
executeCompilerCompareOutputJS();
|
||||
|
||||
Assert.assertFalse(new File(tmpdir.getTmpDir(), "out.js").isFile());
|
||||
Assert.assertFalse(new File(tmpdir.getTmpDir(), "out.js").exists());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user