Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java')
-rw-r--r--org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java
index e150c4336..22a124740 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java
@@ -209,8 +209,12 @@ public class ClasspathShortenerTests extends AbstractDebugTest {
assertArrayEquals(new String[] { JAVA_8_PATH, ENCODING_ARG, "-cp", classpathShortener.getProcessTempFiles().get(0).getAbsolutePath(),
MAIN_CLASS, "-arg1", "arg2" }, classpathShortener.getCmdLine());
List<File> classpathJars = getClasspathJarsFromJarManifest(classpathShortener.getProcessTempFiles().get(0));
- assertEquals(new File(userHomePath("/workspace/myProject/bin")), classpathJars.get(0).getCanonicalFile());
- assertEquals(new File(userHomePath("/workspace/myProject/lib/lib 1.jar")), classpathJars.get(1).getCanonicalFile());
+ String filePathSuffix = new File(userHomePath("/workspace/myProject/bin")).getPath();
+ int index = classpathJars.get(0).getCanonicalFile().getPath().lastIndexOf(filePathSuffix);
+ assertTrue("First Classpath jar file location not found", index != -1);
+ filePathSuffix = new File(userHomePath("/workspace/myProject/lib/lib 1.jar")).getPath();
+ index = classpathJars.get(1).getCanonicalFile().getPath().lastIndexOf(filePathSuffix);
+ assertTrue("Second Classpath jar file location not found", index != -1);
}
public void testClasspathEnvVariableUsedForLongClasspathOnJava8OnWindows() {

Back to the top