Merge pull request #78 from xzyfer/fix/broken-tests

Fix failing tests for copyDirSyncRecursive.
This commit is contained in:
Ryan McGrath 2014-02-10 14:17:46 +08:00
commit 6b80b65a7f

View file

@ -92,7 +92,6 @@ module.exports = testCase({
test.ok(fs.existsSync(dir), 'Folders should exist');
wrench.mkdirSyncRecursive(testdir, 0777);
wrench.copyDirSyncRecursive(dir, testdir, { excludeHiddenUnix: false });
var files = wrench.readdirSyncRecursive(testdir);
@ -109,7 +108,6 @@ module.exports = testCase({
test.ok(fs.existsSync(dir), 'Folders should exist');
wrench.mkdirSyncRecursive(testdir, 0777);
wrench.copyDirSyncRecursive(dir, testdir, { excludeHiddenUnix: true });
var files = wrench.readdirSyncRecursive(testdir);
@ -126,7 +124,6 @@ module.exports = testCase({
test.ok(fs.existsSync(dir), 'Folders should exist');
wrench.mkdirSyncRecursive(testdir, 0777);
wrench.copyDirSyncRecursive(dir, testdir, { excludeHiddenUnix: false, inflateSymlinks: true });
var files = wrench.readdirSyncRecursive(testdir);
@ -143,7 +140,6 @@ module.exports = testCase({
test.ok(fs.existsSync(dir), 'Folders should exist');
wrench.mkdirSyncRecursive(testdir, 0777);
wrench.copyDirSyncRecursive(dir, testdir, { excludeHiddenUnix: false, inflateSymlinks: false });
var files = wrench.readdirSyncRecursive(testdir);
@ -161,14 +157,14 @@ module.exports = testCase({
test.ok(fs.existsSync(dir), 'Folders should exist');
wrench.mkdirSyncRecursive(testdir1, 0777);
// wrench.mkdirSyncRecursive(testdir1, 0777);
wrench.copyDirSyncRecursive(dir, testdir1, { excludeHiddenUnix: false });
wrench.copyDirSyncRecursive(dir, testdir2, { excludeHiddenUnix: false });
fs.writeFileSync(path.join(testdir1, ".hidden.txt"), 'just some text for .hidden.txt');
fs.writeFileSync(path.join(testdir1, "bar.txt"), 'just some text for bar.txt');
wrench.copyDirSyncRecursive(testdir1, testdir2, { preserve: true, excludeHiddenUnix: false, preserveFiles: true });
wrench.copyDirSyncRecursive(testdir1, testdir2, { excludeHiddenUnix: false, preserveFiles: true });
var files = wrench.readdirSyncRecursive(testdir2);
@ -186,14 +182,14 @@ module.exports = testCase({
test.ok(fs.existsSync(dir), 'Folders should exist');
wrench.mkdirSyncRecursive(testdir1, 0777);
// wrench.mkdirSyncRecursive(testdir1, 0777);
wrench.copyDirSyncRecursive(dir, testdir1, { excludeHiddenUnix: false });
wrench.copyDirSyncRecursive(dir, testdir2, { excludeHiddenUnix: false });
fs.writeFileSync(path.join(testdir1, ".hidden.txt"), 'just some text for .hidden.txt');
fs.writeFileSync(path.join(testdir1, "bar.txt"), 'just some text for bar.txt');
wrench.copyDirSyncRecursive(testdir1, testdir2, { preserve: true, excludeHiddenUnix: false, preserveFiles: false });
wrench.copyDirSyncRecursive(testdir1, testdir2, { forceDelete: true, excludeHiddenUnix: false, preserveFiles: false });
var files = wrench.readdirSyncRecursive(testdir2);