ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r912470 - in /ant/core/trunk: WHATSNEW src/tests/junit/org/apache/tools/ant/taskdefs/optional/unix/SymlinkTest.java
Date Mon, 22 Feb 2010 02:48:28 GMT
Author: antoine
Date: Mon Feb 22 02:48:27 2010
New Revision: 912470

URL: http://svn.apache.org/viewvc?rev=912470&view=rev
Log:
Fixing SymlinkTest#testSymbolicLinkUtilsMethods on Mac. Removing special handling of the Mac
platform in this test case.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/unix/SymlinkTest.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=912470&r1=912469&r2=912470&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Mon Feb 22 02:48:27 2010
@@ -34,7 +34,10 @@
    Bugzilla Report 48782
    
 *  Fix for exec task sometimes inserts extraneous newlines
-   Bugzilla Report 48746      
+   Bugzilla Report 48746
+   
+*  SymlinkTest#testSymbolicLinkUtilsMethods failing on MacOS
+   Bugzilla Report 48785.        
 
 Other changes:
 --------------

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/unix/SymlinkTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/unix/SymlinkTest.java?rev=912470&r1=912469&r2=912470&view=diff
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/unix/SymlinkTest.java
(original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/unix/SymlinkTest.java
Mon Feb 22 02:48:27 2010
@@ -254,15 +254,18 @@
             assertFalse(su.isDanglingSymbolicLink(f.getParentFile(),
                                                   f.getName()));
 
-            //apparently OS X knows a symlink is a symlink even if the target is missing:
-            boolean mac = Os.isFamily(Os.FAMILY_MAC);
-
+            // it is not possible to find out that symbolic links pointing
+            // to inexistent files or directories are symbolic links
+            // it used to be possible to detect this on Mac
+            // this is not true under Snow Leopard and JDK 1.5
+            // Removing special handling of MacOS until someone shouts
+            // Antoine
             f = getProject().resolveFile("test-working/file.notthere");
             assertFalse(f.exists());
             assertFalse(f.isDirectory());
             assertFalse(f.isFile());
-            assertTrue(su.isSymbolicLink(f.getAbsolutePath()) == mac);
-            assertTrue(su.isSymbolicLink(f.getParentFile(), f.getName()) == mac);
+            assertTrue(su.isSymbolicLink(f.getAbsolutePath()) == false);
+            assertTrue(su.isSymbolicLink(f.getParentFile(), f.getName()) == false);
             assertTrue(su.isDanglingSymbolicLink(f.getAbsolutePath()));
             assertTrue(su.isDanglingSymbolicLink(f.getParentFile(),
                                                  f.getName()));
@@ -271,8 +274,8 @@
             assertFalse(f.exists());
             assertFalse(f.isDirectory());
             assertFalse(f.isFile());
-            assertTrue(su.isSymbolicLink(f.getAbsolutePath()) == mac);
-            assertTrue(su.isSymbolicLink(f.getParentFile(), f.getName()) == mac);
+            assertTrue(su.isSymbolicLink(f.getAbsolutePath()) == false);
+            assertTrue(su.isSymbolicLink(f.getParentFile(), f.getName()) == false);
             assertTrue(su.isDanglingSymbolicLink(f.getAbsolutePath()));
             assertTrue(su.isDanglingSymbolicLink(f.getParentFile(),
                                                  f.getName()));



Mime
View raw message