Return-Path: Delivered-To: apmail-ant-notifications-archive@locus.apache.org Received: (qmail 22063 invoked from network); 10 Oct 2008 17:57:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Oct 2008 17:57:15 -0000 Received: (qmail 78954 invoked by uid 500); 10 Oct 2008 17:57:15 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 78930 invoked by uid 500); 10 Oct 2008 17:57:15 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 78921 invoked by uid 99); 10 Oct 2008 17:57:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Oct 2008 10:57:14 -0700 X-ASF-Spam-Status: No, hits=-1998.6 required=10.0 tests=ALL_TRUSTED,TVD_FUZZY_SYMBOL X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Oct 2008 17:56:18 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E389C2388961; Fri, 10 Oct 2008 10:56:54 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r703537 - /ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/unix/SymlinkTest.java Date: Fri, 10 Oct 2008 17:56:54 -0000 To: notifications@ant.apache.org From: mbenson@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081010175654.E389C2388961@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mbenson Date: Fri Oct 10 10:56:54 2008 New Revision: 703537 URL: http://svn.apache.org/viewvc?rev=703537&view=rev Log: make symlink junit test pass on OS X Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/unix/SymlinkTest.java 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=703537&r1=703536&r2=703537&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 Fri Oct 10 10:56:54 2008 @@ -254,13 +254,15 @@ 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); + f = getProject().resolveFile("test-working/file.notthere"); assertFalse(f.exists()); assertFalse(f.isDirectory()); assertFalse(f.isFile()); - assertFalse(su.isSymbolicLink(f.getAbsolutePath())); - assertFalse(su.isSymbolicLink(f.getParentFile(), - f.getName())); + assertTrue(su.isSymbolicLink(f.getAbsolutePath()) == mac); + assertTrue(su.isSymbolicLink(f.getParentFile(), f.getName()) == mac); assertTrue(su.isDanglingSymbolicLink(f.getAbsolutePath())); assertTrue(su.isDanglingSymbolicLink(f.getParentFile(), f.getName())); @@ -269,9 +271,8 @@ assertFalse(f.exists()); assertFalse(f.isDirectory()); assertFalse(f.isFile()); - assertFalse(su.isSymbolicLink(f.getAbsolutePath())); - assertFalse(su.isSymbolicLink(f.getParentFile(), - f.getName())); + assertTrue(su.isSymbolicLink(f.getAbsolutePath()) == mac); + assertTrue(su.isSymbolicLink(f.getParentFile(), f.getName()) == mac); assertTrue(su.isDanglingSymbolicLink(f.getAbsolutePath())); assertTrue(su.isDanglingSymbolicLink(f.getParentFile(), f.getName()));