diff --git a/compiler/testData/cli/js/jsHelp.args b/compiler/testData/cli/js/jsHelp.args new file mode 100644 index 00000000000..97f455ac44e --- /dev/null +++ b/compiler/testData/cli/js/jsHelp.args @@ -0,0 +1 @@ +-help diff --git a/compiler/testData/cli/js/jsHelp.out b/compiler/testData/cli/js/jsHelp.out new file mode 100644 index 00000000000..2f4778ace97 --- /dev/null +++ b/compiler/testData/cli/js/jsHelp.out @@ -0,0 +1,16 @@ +Usage: org.jetbrains.jet.cli.common.arguments.K2JSCompilerArguments + -output [String] Output file path + -libraryFiles [String[,]] Path to zipped lib sources or kotlin files + -sourceFiles [String[,]] Source files (dir or file) + -sourcemap [flag] Generate SourceMap + -target [String] Generate JS files for specific ECMA version (only ECMA 5 is supported) + -main [String] Whether a main function should be called; either 'call' or 'noCall', default 'call' (main function will be auto detected) + -outputPrefix [String] Path to file which will be added to the beginning of output file + -outputPostfix [String] Path to file which will be added to the end of output file + -tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag + -verbose [flag] Enable verbose logging output + -version [flag] Display compiler version + -help (-h) [flag] Print a synopsis of standard options + -suppress [String] Suppress compiler messages by severity (warnings) + -printArgs [flag] Print command line arguments +OK \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/cli/KotlincExecutableTestGenerated.java b/compiler/tests/org/jetbrains/jet/cli/KotlincExecutableTestGenerated.java index 870af9a1ab3..8b37391d1c9 100644 --- a/compiler/tests/org/jetbrains/jet/cli/KotlincExecutableTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/cli/KotlincExecutableTestGenerated.java @@ -171,6 +171,11 @@ public class KotlincExecutableTestGenerated extends AbstractKotlincExecutableTes JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cli/js"), Pattern.compile("^(.+)\\.args$"), true); } + @TestMetadata("jsHelp.args") + public void testJsHelp() throws Exception { + doJsTest("compiler/testData/cli/js/jsHelp.args"); + } + @TestMetadata("outputPostfixFileNotFound.args") public void testOutputPostfixFileNotFound() throws Exception { doJsTest("compiler/testData/cli/js/outputPostfixFileNotFound.args"); diff --git a/compiler/tests/org/jetbrains/jet/cli/js/K2JsCliTest.java b/compiler/tests/org/jetbrains/jet/cli/js/K2JsCliTest.java index 27f3ef5998d..3c786f8e43b 100644 --- a/compiler/tests/org/jetbrains/jet/cli/js/K2JsCliTest.java +++ b/compiler/tests/org/jetbrains/jet/cli/js/K2JsCliTest.java @@ -16,8 +16,8 @@ package org.jetbrains.jet.cli.js; -import junit.framework.Assert; import org.jetbrains.jet.cli.CliBaseTest; +import org.junit.Assert; import org.junit.Test; import java.io.File; @@ -43,4 +43,9 @@ public class K2JsCliTest extends CliBaseTest { Assert.assertFalse(new File(tmpdir.getTmpDir(), "out.js").isFile()); } + + @Test + public void jsHelp() throws Exception { + executeCompilerCompareOutputJS(); + } }