mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 20:42:21 +00:00
Merge branch 'pull-714'
This commit is contained in:
commit
d5c368dd8e
2 files changed
+37
-2
No files matched your search
@@ -618,4 +618,33 @@ public class FilePathTest extends ChannelTestCase {
|
||||
|
||||
return new ByteArrayInputStream(buf.toByteArray());
|
||||
}
|
||||
|
||||
@Bug(16846)
|
||||
public void testMoveAllChildrenTo() throws IOException, InterruptedException {
|
||||
final File tmp = Util.createTempDir();
|
||||
try
|
||||
{
|
||||
final String dirname = "sub";
|
||||
final File top = new File(tmp, "test");
|
||||
final File sub = new File(top, dirname);
|
||||
final File subsub = new File(sub, dirname);
|
||||
|
||||
subsub.mkdirs();
|
||||
|
||||
final File subFile1 = new File( sub.getAbsolutePath() + "/file1.txt" );
|
||||
subFile1.createNewFile();
|
||||
final File subFile2 = new File( subsub.getAbsolutePath() + "/file2.txt" );
|
||||
subFile2.createNewFile();
|
||||
|
||||
final FilePath src = new FilePath(sub);
|
||||
final FilePath dst = new FilePath(top);
|
||||
|
||||
// test conflict subdir
|
||||
src.moveAllChildrenTo(dst);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Util.deleteRecursive(tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user