[maven][wsl][test] fix ScriptMavenExecutionTest execution on WSL

GitOrigin-RevId: eba908c7e642facc3c077b393b543d8413bb1a2c
This commit is contained in:
Alexander.Glukhov
2025-09-22 11:07:28 +00:00
committed by intellij-monorepo-bot
parent 73d9070cc1
commit 57597e2a39
@@ -66,7 +66,7 @@ class ScriptMavenExecutionTest : MavenExecutionTest() {
private fun createFakeProjectWrapper() {
createProjectSubFile(".mvn/wrapper/maven-wrapper.properties",
"distributionUrl=http://example.com")
if (SystemInfo.isWindows) {
if (EelOsFamily.Windows == project.getEelDescriptor().osFamily) {
createProjectSubFile("mvnw.cmd", "@echo $wrapperOutput\r\n@echo %*\r\n@set")
}
else {
@@ -258,7 +258,7 @@ class ScriptMavenExecutionTest : MavenExecutionTest() {
assertTrue("Should pass env variables in run configuration, but stdout: ${executionInfo.stdout}", mavenOptsLineStarts != -1)
val mavenOptsLineEnd = executionInfo.stdout.indexOf("\n", mavenOptsLineStarts)
val mavenOptsLine = executionInfo.stdout.substring(mavenOptsLineStarts, mavenOptsLineEnd)
assertTrue("MAVEN_OPTS should contain parameters, but was ${mavenOptsLine}", mavenOptsLine.contains("$option"))
assertTrue("MAVEN_OPTS should contain parameters, but was ${mavenOptsLine}", mavenOptsLine.contains(option))
}
@Test