Browse Source

Added a testcase showing resolution of PR 14063

Ant ftp did not download file it is a symlink
PR: 14063


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275030 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 22 years ago
parent
commit
1c3832c2f3
2 changed files with 21 additions and 1 deletions
  1. +3
    -0
      WHATSNEW
  2. +18
    -1
      src/testcases/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java

+ 3
- 0
WHATSNEW View File

@@ -225,6 +225,9 @@ Fixed bugs:
* ftp did not set the ascii mode explicity, causing problems with ftp servers * ftp did not set the ascii mode explicity, causing problems with ftp servers
having binary as default 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. * replace would change \r\n into \r\r\n under Windows.


* junitreport with frames did not display a link for classes without a package * junitreport with frames did not display a link for classes without a package


+ 18
- 1
src/testcases/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java View File

@@ -241,7 +241,24 @@ public class FTPTest extends BuildFileTest{
ds.scan(); ds.scan();
compareFiles(ds, new String[] {}, new String[] {}); 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 // father and child pattern test
public void testOrderOfIncludePatternsIrrelevant() { public void testOrderOfIncludePatternsIrrelevant() {
if (!loginSuceeded) { if (!loginSuceeded) {


Loading…
Cancel
Save