From f36f9c3b5e8a38e5f26e1d29c9147ca5c56725d2 Mon Sep 17 00:00:00 2001 From: Sarika Sinha Date: Tue, 24 May 2016 09:12:56 +0530 Subject: Bug 465594 - [TestCase] To add a testcase for Bug 389564 Change-Id: I4b2900753e76cd8fdafd39fd7727b3f649e69ea8 --- .../tests/org/eclipse/ant/tests/core/tests/FrameworkTests.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/FrameworkTests.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/FrameworkTests.java index 3ca5f3b0c..43fd55cab 100644 --- a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/FrameworkTests.java +++ b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/FrameworkTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -278,7 +278,9 @@ public class FrameworkTests extends AbstractAntTest { prefs.setAntHomeClasspathEntries(newEntries); IAntClasspathEntry resultedEntries[] = prefs.getAntHomeClasspathEntries(); + int index = resultedEntries[entries.length].getLabel().indexOf("hub"); //$NON-NLS-1$ + assertNotSame("Missing machine details", index, -1); //$NON-NLS-1$ assertFalse("Incorrect classpath entry. This would have been the value before the fix", resultedEntries[entries.length].getLabel().equals(new Path("/home/tom/.eclipse/3.8/configuration/org.eclipse.osgi/bundles/21/2/.cp/lib/remote.jar").toOSString())); //$NON-NLS-1$ //$NON-NLS-2$ - assertTrue("Incorrect classpath entry", resultedEntries[entries.length].getLabel().equals(new Path("//hub/home/tom/.eclipse/3.8/configuration/org.eclipse.osgi/bundles/21/2/.cp/lib/remote.jar").toOSString())); //$NON-NLS-1$ //$NON-NLS-2$ + assertTrue("Incorrect classpath entry", resultedEntries[entries.length].getLabel().substring(index).equals(new Path("hub/home/tom/.eclipse/3.8/configuration/org.eclipse.osgi/bundles/21/2/.cp/lib/remote.jar").toOSString())); //$NON-NLS-1$ //$NON-NLS-2$ } } -- cgit v1.2.3