CLI tests: fix incorrect order of replacing versions
The change 9de6df6104 caused tests `requireKotlinCompilerVersion{,K2}`
to fail once the compiler version was changed to 2.0.0-dev-*. The reason
is that when patch version is 0, compiler version is equal to the
language version (which is itself always equal to JvmMetadataVersion).
So if we're replacing JvmMetadataVersion first, we end up with
`$ABI_VERSION$-dev-...` in the output, which is incorrect.
This commit is contained in:
committed by
Space Team
parent
e803977924
commit
5ff15f6847
@@ -102,11 +102,11 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
|
||||
.replace(org.jetbrains.kotlin.konan.file.File.Companion.getUserDir().getAbsolutePath(), "$USER_DIR$")
|
||||
.replace(tmpDirAbsoluteDir, "$TMP_DIR$")
|
||||
.replaceAll("info: executable production duration: \\d+ms", "info: executable production duration: [time]")
|
||||
.replace(KotlinCompilerVersion.VERSION, "$VERSION$")
|
||||
.replace(" " + JvmMetadataVersion.INSTANCE, " $ABI_VERSION$")
|
||||
.replace(" " + JsMetadataVersion.INSTANCE, " $ABI_VERSION$")
|
||||
.replace(" " + JvmMetadataVersion.INSTANCE_NEXT, " $ABI_VERSION_NEXT$")
|
||||
.replace("\\", "/")
|
||||
.replace(KotlinCompilerVersion.VERSION, "$VERSION$")
|
||||
.replace("\n" + Usage.BAT_DELIMITER_CHARACTERS_NOTE + "\n", "")
|
||||
.replaceAll("log4j:WARN.*\n", "");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user