Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 89235 Details for
Bug 198291
AliasManager should track symlinks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Test
198291_20080208_test.txt (text/plain), 2.93 KB, created by
Szymon Brandys
on 2008-02-08 04:55:35 EST
(
hide
)
Description:
Test
Filename:
MIME Type:
Creator:
Szymon Brandys
Created:
2008-02-08 04:55:35 EST
Size:
2.93 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.core.tests.resources >Index: src/org/eclipse/core/tests/resources/regression/Bug_198291.java >=================================================================== >RCS file: src/org/eclipse/core/tests/resources/regression/Bug_198291.java >diff -N src/org/eclipse/core/tests/resources/regression/Bug_198291.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/core/tests/resources/regression/Bug_198291.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,82 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.core.tests.resources.regression; >+ >+import java.io.*; >+import junit.framework.Test; >+import junit.framework.TestSuite; >+import org.eclipse.core.resources.*; >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.tests.resources.ResourceTest; >+ >+public class Bug_198291 extends ResourceTest { >+ /** >+ * Constructor for Bug_198291. >+ */ >+ public Bug_198291() { >+ super(); >+ } >+ >+ /** >+ * Constructor for Bug_198291. >+ * @param name >+ */ >+ public Bug_198291(String name) { >+ super(name); >+ } >+ >+ public static Test suite() { >+ return new TestSuite(Bug_198291.class); >+ } >+ >+ public void testBug() { >+ IWorkspace workspace = ResourcesPlugin.getWorkspace(); >+ >+ try { >+ IProject project1 = workspace.getRoot().getProject("project1"); >+ project1.create(null); >+ project1.open(null); >+ >+ IFolder folder1 = project1.getFolder("folder1"); >+ folder1.create(true, true, getMonitor()); >+ assertExistsInWorkspace("1.0", folder1); >+ >+ mkLink(project1.getLocation().toFile(), "folder2" , folder1.getLocation().toString(), true); >+ >+ project1.refreshLocal(IResource.DEPTH_INFINITE, getMonitor()); >+ IFolder folder2 = project1.getFolder("folder2"); >+ assertExistsInWorkspace("2.0", folder2); >+ >+ IFile file1 = folder1.getFile("file1"); >+ file1.create(new ByteArrayInputStream("elo".getBytes()),true, getMonitor()); >+ assertExistsInWorkspace("3.0", file1); >+ >+ assertExistsInWorkspace("4.0",folder2.getFile("file1")); >+ } catch (CoreException e) { >+ fail("5.0", e); >+ } >+ } >+ >+ protected void mkLink(File dir, String src, String tgt, boolean isDir) { >+ String[] envp = {}; >+ try { >+ Process p; >+ String[] cmd = {"ln", "-s", tgt, src}; >+ p = Runtime.getRuntime().exec(cmd, envp, dir); >+ int exitcode = p.waitFor(); >+ assertEquals(exitcode, 0); >+ } catch (IOException e) { >+ fail("mkLink", e); >+ } catch (InterruptedException e) { >+ fail("mkLink", e); >+ } >+ } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 198291
: 89235