1717package com.linecorp.support.project.multi.recipe
1818
1919import assertk.assertThat
20- import assertk.assertions.isTrue
20+ import assertk.assertions.contains
21+ import org.gradle.kotlin.dsl.support.normaliseLineSeparators
2122import org.gradle.testkit.runner.GradleRunner
2223import org.junit.jupiter.api.Test
2324import java.nio.file.Paths
@@ -69,7 +70,7 @@ project ':juice:api:protocol' is configured by
6970project ':juice:api:server' is configured by
7071 - type prefix [java]
7172 - type having [boot]
72- - type suffix [boot-application]""" .trimIndent()
73+ - type suffix [boot-application]""" .trimIndent().normaliseLineSeparators()
7374
7475 @Test
7576 fun `kotlin dsl test` () {
@@ -78,11 +79,11 @@ project ':juice:api:server' is configured by
7879 GradleRunner .create()
7980 .withProjectDir(file.toFile())
8081 .withPluginClasspath()
81- .withArguments(" allProjectReport" , " --stacktrace" )
82- .withGradleVersion(" 5.5.1" )
82+ .withArguments(" allProjectReport" )
8383 .build()
8484 .also { println (it.output) }
85- .also { assertThat(it.output.contains(expected)).isTrue() }
85+ .let { it.output.normaliseLineSeparators() }
86+ .also { assertThat(it).contains(expected) }
8687 }
8788
8889 @Test
@@ -92,10 +93,10 @@ project ':juice:api:server' is configured by
9293 GradleRunner .create()
9394 .withProjectDir(file.toFile())
9495 .withPluginClasspath()
95- .withArguments(" allProjectReport" , " --stacktrace" )
96- .withGradleVersion(" 5.5.1" )
96+ .withArguments(" allProjectReport" )
9797 .build()
9898 .also { println (it.output) }
99- .also { assertThat(it.output.contains(expected)).isTrue() }
99+ .let { it.output.normaliseLineSeparators() }
100+ .also { assertThat(it).contains(expected) }
100101 }
101102}
0 commit comments