|
|
@@ -226,6 +226,40 @@ public class FTPTest extends BuildFileTest{ |
|
|
|
dsSource.scan(); |
|
|
|
compareFiles(dsSource, sortedDestinationFiles, sortedDestinationDirectories); |
|
|
|
} |
|
|
|
public void testGetFollowSymlinksTrue() { |
|
|
|
if (!supportsSymlinks) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!loginSuceeded) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!changeRemoteDir(remoteTmpDir)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
getProject().executeTarget("ftp-get-directory-symbolic-link"); |
|
|
|
FileSet fsDestination = (FileSet) getProject().getReference("fileset-destination-without-selector"); |
|
|
|
DirectoryScanner dsDestination = fsDestination.getDirectoryScanner(getProject()); |
|
|
|
dsDestination.scan(); |
|
|
|
compareFiles(dsDestination, new String[] {"alpha/beta/gamma/gamma.xml"}, |
|
|
|
new String[] {"alpha", "alpha/beta", "alpha/beta/gamma"}); |
|
|
|
} |
|
|
|
public void testGetFollowSymlinksFalse() { |
|
|
|
if (!supportsSymlinks) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!loginSuceeded) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!changeRemoteDir(remoteTmpDir)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
getProject().executeTarget("ftp-get-directory-no-symbolic-link"); |
|
|
|
FileSet fsDestination = (FileSet) getProject().getReference("fileset-destination-without-selector"); |
|
|
|
DirectoryScanner dsDestination = fsDestination.getDirectoryScanner(getProject()); |
|
|
|
dsDestination.scan(); |
|
|
|
compareFiles(dsDestination, new String[] {}, |
|
|
|
new String[] {}); |
|
|
|
} |
|
|
|
public void testAllowSymlinks() { |
|
|
|
if (!supportsSymlinks) { |
|
|
|
return; |
|
|
|