Skip to content

Commit

Permalink
Some lines have a hanging space, some don't
Browse files Browse the repository at this point in the history
  • Loading branch information
schneems committed Jan 21, 2025
1 parent c8de854 commit e2f44ec
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions buildpacks/jvm/tests/integration/versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ fn openjdk_default() {
]),
|context| {
assert_contains!(
context.pack_stderr,
&formatdoc! {"
trim_end_of_lines(&context.pack_stderr),
&trim_end_of_lines(&formatdoc! {"
! WARNING: No OpenJDK version specified
!
!
! Your application does not explicitly specify an OpenJDK version. The latest
! long-term support (LTS) version will be installed. This currently is OpenJDK 21.
!
!
! This default version will change when a new LTS version is released. Your
! application might fail to build with the new version. We recommend explicitly
! setting the required OpenJDK version for your application.
!
!
! To set the OpenJDK version, add or edit the system.properties file in the root
! directory of your application to contain:
!
! java.runtime.version = 21"});
!
! java.runtime.version = 21"}));

assert_contains!(
context.run_shell_command("java -version").stderr,
Expand All @@ -40,6 +40,14 @@ fn openjdk_default() {
);
}

fn trim_end_of_lines(input: &str) -> String {
input
.lines()
.map(|line| line.trim_end())
.collect::<Vec<&str>>()
.join("\n")
}

#[test]
#[ignore = "integration test"]
fn openjdk_functions_default() {
Expand Down

0 comments on commit e2f44ec

Please sign in to comment.