Skip to content

Commit

Permalink
Revert "Adapt MavenLaunchDelegateTest to not yet present console
Browse files Browse the repository at this point in the history
coloring"

Now that we build against Eclipse 4.25(-I-builds) coloring is present in
the Eclipse-platform.

This reverts commit 8b36acb.
  • Loading branch information
HannesWell committed Aug 18, 2022
1 parent 8b36acb commit fb4aad3
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,20 @@ public void testGlobalSettingsProgramArguments() throws Exception {
ILaunchConfiguration configuration = getLaunchConfiguration("projects/444262_settings");
try {
performDummyLaunch(configuration);
assertArrayEquals(new String[] {"-B", "-Dstyle.color=never"},
assertArrayEquals(new String[] {"-B", "-Dstyle.color=always"},
runner.getConfiguration().getProgramArguments());

// relative preference path to global settings is relative to eclipse home
mavenConfig.setGlobalSettingsFile("settings_empty.xml");
performDummyLaunch(configuration);
assertArrayEquals(
new String[] {"-B", "-Dstyle.color=never", "-gs", new File("settings_empty.xml").getAbsolutePath()},
new String[] {"-B", "-Dstyle.color=always", "-gs", new File("settings_empty.xml").getAbsolutePath()},
runner.getConfiguration().getProgramArguments());

// specifying -gs within goals overrides global settings from configuration
configuration.getAttributes().put(MavenLaunchConstants.ATTR_GOALS, "clean -gs other_settings.xml");
performDummyLaunch(configuration);
assertArrayEquals(new String[] {"-B", "-Dstyle.color=never", "clean", "-gs", "other_settings.xml"},
assertArrayEquals(new String[] {"-B", "-Dstyle.color=always", "clean", "-gs", "other_settings.xml"},
runner.getConfiguration().getProgramArguments());

} finally {
Expand All @@ -155,12 +155,12 @@ public void testUserSettingsProgramArguments() throws Exception {
try {
mavenConfig.setUserSettingsFile(new File("settings_empty.xml").getAbsolutePath());
performDummyLaunch(configuration);
assertArrayEquals(new String[] {"-B", "-Dstyle.color=never", "-s", mavenConfig.getUserSettingsFile()},
assertArrayEquals(new String[] {"-B", "-Dstyle.color=always", "-s", mavenConfig.getUserSettingsFile()},
runner.getConfiguration().getProgramArguments());

configuration.getAttributes().put(MavenLaunchConstants.ATTR_USER_SETTINGS, "settings.xml");
performDummyLaunch(configuration);
assertArrayEquals(new String[] {"-B", "-Dstyle.color=never", "-s", "settings.xml"},
assertArrayEquals(new String[] {"-B", "-Dstyle.color=always", "-s", "settings.xml"},
runner.getConfiguration().getProgramArguments());
} finally {
mavenConfig.setUserSettingsFile(null);
Expand Down

0 comments on commit fb4aad3

Please sign in to comment.