From 3d81eba32bbd9b1df7d37d571b799df5eb2f2975 Mon Sep 17 00:00:00 2001 From: Alexander Dudinsky Date: Mon, 29 Mar 2021 23:29:45 +0300 Subject: [PATCH] New HMPP import and highlighting tests New tests `testHmppLibAndConsumer` and `testMultiModulesHmpp` were added The first is a test with MPP library and its consumers, it checks import and also highlighting before and after the library was published The second is a project which contains three multiplatform modules and two platform modules and checks import and highlighting. Original commit: https://jetbrains.team/p/ij/repositories/intellij/revision/15582b03530eba4fa0e3d0b512bb0a4c1fa3aa4c --- .../AbstractCodeMetaInfoRenderConfiguration.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/codeMetaInfo/renderConfigurations/AbstractCodeMetaInfoRenderConfiguration.kt b/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/codeMetaInfo/renderConfigurations/AbstractCodeMetaInfoRenderConfiguration.kt index 1867150a652..df25725dee5 100644 --- a/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/codeMetaInfo/renderConfigurations/AbstractCodeMetaInfoRenderConfiguration.kt +++ b/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/codeMetaInfo/renderConfigurations/AbstractCodeMetaInfoRenderConfiguration.kt @@ -9,7 +9,7 @@ import com.intellij.openapi.util.text.StringUtil import org.jetbrains.kotlin.codeMetaInfo.model.CodeMetaInfo abstract class AbstractCodeMetaInfoRenderConfiguration(var renderParams: Boolean = true) { - private val clickOrPressRegex = "Click or press (.*)to navigate".toRegex() // We have different hotkeys on different platforms + private val clickOrPressRegex = "(Click or press|Press).*(to navigate)".toRegex() // We have different hotkeys on different platforms open fun asString(codeMetaInfo: CodeMetaInfo): String = codeMetaInfo.tag + getAttributesString(codeMetaInfo) open fun getAdditionalParams(codeMetaInfo: CodeMetaInfo) = "" @@ -18,7 +18,7 @@ abstract class AbstractCodeMetaInfoRenderConfiguration(var renderParams: Boolean if (originalText == null) return "null" val noHtmlTags = StringUtil.removeHtmlTags(originalText) .replace(" ", "") - .replace(clickOrPressRegex, "") + .replace(clickOrPressRegex, "$1 ... $2") .trim() return sanitizeLineBreaks(noHtmlTags) }