Skip to content

Commit

Permalink
#239: Normalize PATH preventing unitended test failure (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
CREITZ25 authored Apr 9, 2024
1 parent b6a41bd commit 3df645d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public void testBasicProjectEnvironment() {
assertThat(IdeVariables.DOCKER_EDITION.get(context)).isEqualTo("docker");
EnvironmentVariables variables = context.getVariables();
assertThat(variables.get("FOO")).isEqualTo("foo-bar-some-${UNDEFINED}");
assertLogMessage(context, IdeLogLevel.WARNING,
"Undefined variable UNDEFINED in 'SOME=some-${UNDEFINED}' for root 'FOO=foo-${BAR}'");
assertLogMessage(context, IdeLogLevel.WARNING, "Undefined variable UNDEFINED in 'SOME=some-${UNDEFINED}' for root 'FOO=foo-${BAR}'");
assertThat(context.getIdeHome().resolve("readme")).hasContent("this is the IDE_HOME directory");
assertThat(context.getIdeRoot().resolve("readme")).hasContent("this is the IDE_ROOT directory");
assertThat(context.getUserHome().resolve("readme")).hasContent("this is the users HOME directory");
Expand All @@ -42,6 +41,7 @@ public void testBasicProjectEnvironment() {
SystemPath systemPath = IdeVariables.PATH.get(context);
assertThat(systemPath).isSameAs(context.getPath());
String envPath = System.getenv(IdeVariables.PATH.getName());
envPath = envPath.replaceAll("[\\\\][;]", ";").replaceAll("[\\/][:]", ":");
assertThat(systemPath.toString()).isNotEqualTo(envPath).endsWith(envPath);
Path softwarePath = context.getSoftwarePath();
Path javaBin = softwarePath.resolve("java/bin");
Expand Down

0 comments on commit 3df645d

Please sign in to comment.