Fix ResourceBannerTests failures on Windows
Fixes gh-2096
This commit is contained in:
parent
a69afa0dca
commit
f1cf66163e
|
@ -28,7 +28,7 @@ import org.springframework.core.io.ByteArrayResource;
|
|||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.mock.env.MockEnvironment;
|
||||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.startsWith;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
/**
|
||||
|
@ -43,7 +43,7 @@ public class ResourceBannerTests {
|
|||
Resource resource = new ByteArrayResource(
|
||||
"banner ${a} ${spring-boot.version} ${application.version}".getBytes());
|
||||
String banner = printBanner(resource, "10.2", "2.0");
|
||||
assertThat(banner, equalTo("banner 1 10.2 2.0\n"));
|
||||
assertThat(banner, startsWith("banner 1 10.2 2.0\n"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -51,7 +51,7 @@ public class ResourceBannerTests {
|
|||
Resource resource = new ByteArrayResource(
|
||||
"banner ${a} ${spring-boot.version} ${application.version}".getBytes());
|
||||
String banner = printBanner(resource, null, null);
|
||||
assertThat(banner, equalTo("banner 1 \n"));
|
||||
assertThat(banner, startsWith("banner 1 \n"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -60,7 +60,7 @@ public class ResourceBannerTests {
|
|||
"banner ${a}${spring-boot.formatted-version}${application.formatted-version}"
|
||||
.getBytes());
|
||||
String banner = printBanner(resource, "10.2", "2.0");
|
||||
assertThat(banner, equalTo("banner 1 (v10.2) (v2.0)\n"));
|
||||
assertThat(banner, startsWith("banner 1 (v10.2) (v2.0)\n"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -69,7 +69,7 @@ public class ResourceBannerTests {
|
|||
"banner ${a}${spring-boot.formatted-version}${application.formatted-version}"
|
||||
.getBytes());
|
||||
String banner = printBanner(resource, null, null);
|
||||
assertThat(banner, equalTo("banner 1\n"));
|
||||
assertThat(banner, startsWith("banner 1\n"));
|
||||
}
|
||||
|
||||
private String printBanner(Resource resource, String bootVersion,
|
||||
|
|
Loading…
Reference in New Issue