ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/net FTPTest.java
Date Tue, 05 Aug 2003 23:18:25 GMT
antoine     2003/08/05 16:18:25

  Modified:    .        WHATSNEW
               src/testcases/org/apache/tools/ant/taskdefs/optional/net
                        FTPTest.java
  Log:
  Added a testcase showing resolution of PR 14063
  Ant ftp did not download file it is a symlink
  PR: 14063
  
  Revision  Changes    Path
  1.481     +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.480
  retrieving revision 1.481
  diff -u -r1.480 -r1.481
  --- WHATSNEW	5 Aug 2003 16:13:02 -0000	1.480
  +++ WHATSNEW	5 Aug 2003 23:18:25 -0000	1.481
  @@ -225,6 +225,9 @@
   * ftp did not set the ascii mode explicity, causing problems with ftp servers
     having binary as default
   
  +* ftp was not able to download files when they were pointed to by symbolic links
  +  Bugzilla Report 14063.
  +
   * replace would change \r\n into \r\r\n under Windows.
   
   * junitreport with frames did not display a link for classes without a package
  
  
  
  1.3       +18 -1     ant/src/testcases/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java
  
  Index: FTPTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FTPTest.java	5 Aug 2003 17:38:57 -0000	1.2
  +++ FTPTest.java	5 Aug 2003 23:18:25 -0000	1.3
  @@ -241,7 +241,24 @@
           ds.scan();
           compareFiles(ds, new String[] {}, new String[] {});
       }
  -
  +    public void testFileSymlink() {
  +        if (!supportsSymlinks) {
  +            return;
  +        }
  +        if (!loginSuceeded) {
  +            return;
  +        }
  +        if (!changeRemoteDir(remoteTmpDir)) {
  +            return;
  +        }
  +        getProject().executeTarget("symlink-file-setup");
  +        FTP.FTPDirectoryScanner ds = myFTPTask.newScanner(ftp);
  +        ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
  +        ds.setIncludes(new String[] {"alpha/beta/gamma/"});
  +        ds.scan();
  +        compareFiles(ds, new String[] {"alpha/beta/gamma/gamma.xml"},
  +                     new String[] {"alpha/beta/gamma"});
  +    }
       // father and child pattern test
       public void testOrderOfIncludePatternsIrrelevant() {
           if (!loginSuceeded) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message