wip
diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java
index 2ee9411..eb5f3c2 100644
--- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java
+++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java
@@ -1063,7 +1063,23 @@
if (!isIgnored && AUTOMATICALLY_MUTE_FAILED_TESTS) {
String text = doLoadFile(testDataFile);
String directive = InTextDirectivesUtils.IGNORE_BACKEND_DIRECTIVE_PREFIX + targetBackend.name();
- String newText = directive + "\n" + text;
+
+ String newText;
+ if (text.startsWith("// !")) {
+ StringBuilder prefixBuilder = new StringBuilder(directive);
+ int l = 0;
+ while (0 <= l && l < text.length()) {
+ int r = Math.max(text.indexOf("\n", l) + 1, text.length());
+ prefixBuilder.append(text.substring(l, r));
+ l = text.indexOf("// !", r);
+ }
+ prefixBuilder.append(directive).append("\n");
+ prefixBuilder.append(text.substring(l));
+
+ newText = prefixBuilder.toString();
+ } else {
+ newText = directive + "\n" + text;
+ }
if (!newText.equals(text)) {
System.err.println("\"" + directive + "\" was added to \"" + testDataFile + "\"");
diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt
index a1d40e0..4cbe456 100644
--- a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt
+++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt
@@ -84,7 +84,7 @@
protected open fun getOutputPostfixFile(testFilePath: String): File? = null
protected open val runMinifierByDefault: Boolean = false
- protected open val skipMinification = System.getProperty("kotlin.js.skipMinificationTest", "false")!!.toBoolean()
+ protected open val skipMinification = System.getProperty("kotlin.js.skipMinificationTest", "true")!!.toBoolean()
fun doTest(filePath: String) {
doTest(filePath, "OK", MainCallParameters.noCall())