From 7660c4881e765b1f6dc5a658f02ef79e61fc0b83 Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Wed, 5 Sep 2012 23:35:23 -0400 Subject: [PATCH] bug 388755: test cases differ on windows and unix --- .../efsextension/tests/EFSExtensionTests.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/efsextension/tests/EFSExtensionTests.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/efsextension/tests/EFSExtensionTests.java index 42cfc668cf9..b3b565633e3 100644 --- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/efsextension/tests/EFSExtensionTests.java +++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/efsextension/tests/EFSExtensionTests.java @@ -20,6 +20,7 @@ import junit.framework.TestSuite; import org.eclipse.cdt.utils.EFSExtensionManager; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; /** * Tests the EFSExtensionManager and EFSExtensionProvider classes, as well as the EFSExtensionProvider extension point. @@ -235,7 +236,11 @@ public class EFSExtensionTests extends TestCase { String path = EFSExtensionManager.getDefault().getMappedPath(originalURI); - assertEquals(path, "c:/foo"); + if (Platform.getOS().equals(Platform.WS_WIN32)) { + assertEquals(path, "c:/foo"); + } else { + assertEquals(path, "/c:/foo"); + } } public void testGetPathFromURI() { @@ -248,7 +253,11 @@ public class EFSExtensionTests extends TestCase { String path = EFSExtensionManager.getDefault().getMappedPath(originalURI); - assertEquals(path, "c:/foo"); + if (Platform.getOS().equals(Platform.WS_WIN32)) { + assertEquals(path, "c:/foo"); + } else { + assertEquals(path, "/c:/foo"); + } } public void testExtension() {