Change format of -X arguments to require value after '='

Report a warning when an argument is passed in the old form (with the
whitespace)

 #KT-17264 Fixed
This commit is contained in:
Alexander Udalov
2017-04-05 16:42:43 +03:00
parent 78c0111c6e
commit f4b6db4dc0
22 changed files with 100 additions and 73 deletions
@@ -173,9 +173,8 @@ class SourceSectionsTest : TestCaseWithTmpdir() {
val sourceToOutput = getTestFiles(".out")
sourceToOutput.forEach { (source, expectedOutput) ->
val args = arrayOf(source.canonicalPath, "-d", tmpdir.canonicalPath,
"-Xplugin", sourceSectionsPluginJar.canonicalPath,
"-Xplugin=${sourceSectionsPluginJar.canonicalPath}",
"-P", TEST_ALLOWED_SECTIONS.joinToString(",") { "plugin:${SourceSectionsCommandLineProcessor.PLUGIN_ID}:${SourceSectionsCommandLineProcessor.SECTIONS_OPTION.name}=$it" })
val (output, code) = captureOut {
CLICompiler.doMainNoExit(K2JVMCompiler(), args)
@@ -205,9 +204,8 @@ class SourceSectionsTest : TestCaseWithTmpdir() {
try {
sourceToOutput.forEach { (source, expectedOutput) ->
val args = arrayOf(source.canonicalPath, "-d", tmpdir.canonicalPath,
"-Xplugin", sourceSectionsPluginJar.canonicalPath,
"-Xplugin=${sourceSectionsPluginJar.canonicalPath}",
"-P", TEST_ALLOWED_SECTIONS.joinToString(",") { "plugin:${SourceSectionsCommandLineProcessor.PLUGIN_ID}:${SourceSectionsCommandLineProcessor.SECTIONS_OPTION.name}=$it" })
messageCollector.clear()