mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 20:42:21 +00:00
Enable ant default excludes to be turned off.
Add a new overload method to list files that include the files that ant excludes by default.
This commit is contained in:
1 parent
6fd4514663
commit
9d8f300179
2 files changed
+35
-3
No files matched your search
@@ -301,7 +301,23 @@ public class FilePathTest extends ChannelTestCase {
|
||||
Util.deleteRecursive(baseDir);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void testListWithDefaultExcludes() throws Exception {
|
||||
File baseDir = Util.createTempDir();
|
||||
try {
|
||||
final Set<FilePath> expected = new HashSet<FilePath>();
|
||||
expected.add(createFilePath(baseDir, "top", "sub", "backup~"));
|
||||
expected.add(createFilePath(baseDir, "top", "CVS", "somefile,v"));
|
||||
expected.add(createFilePath(baseDir, "top", ".git", "config"));
|
||||
// none of the files are included by default (default includes true)
|
||||
assertEquals(0, new FilePath(baseDir).list("**", "").length);
|
||||
final FilePath[] result = new FilePath(baseDir).list("**", "", false);
|
||||
assertEquals(expected, new HashSet<FilePath>(Arrays.asList(result)));
|
||||
} finally {
|
||||
Util.deleteRecursive(baseDir);
|
||||
}
|
||||
}
|
||||
|
||||
@Bug(11073)
|
||||
public void testIsUnix() {
|
||||
FilePath winPath = new FilePath(new LocalChannel(null),
|
||||
|
||||
Reference in new issue
Block a user