JS: Use the same output paths for JPS and Maven-based builds

#KT-22586 Fixed

Original commit: ae37cc30a1
This commit is contained in:
Alexey Sedunov
2018-03-12 20:53:32 +03:00
parent a4fd51a823
commit 78ee6ba693
10 changed files with 107 additions and 6 deletions
@@ -262,6 +262,13 @@ open class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
return list.toTypedArray()
}
fun testKotlinJavaScriptProjectWithCustomOutputPaths() {
initProject(JS_STDLIB)
buildAllModules().assertSuccessful()
checkOutputFilesList(File(workDir, "target"))
}
fun testKotlinJavaScriptProjectWithSourceMap() {
initProject(JS_STDLIB)
buildAllModules().assertSuccessful()
@@ -686,7 +693,7 @@ open class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
}
private fun checkOutputFilesList() {
private fun checkOutputFilesList(outputDir: File = productionOutputDir) {
if (!expectedOutputFile.exists()) {
expectedOutputFile.writeText("")
throw IllegalStateException("$expectedOutputFile did not exist. Created empty file.")
@@ -694,7 +701,7 @@ open class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
val sb = StringBuilder()
val p = Printer(sb, " ")
productionOutputDir.printFilesRecursively(p)
outputDir.printFilesRecursively(p)
UsefulTestCase.assertSameLinesWithFile(expectedOutputFile.canonicalPath, sb.toString(), true)
}