Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

Commit

Permalink
Merge pull request #78 from xzyfer/fix/broken-tests
Browse files Browse the repository at this point in the history
Fix failing tests for copyDirSyncRecursive.
  • Loading branch information
Ryan McGrath committed Feb 10, 2014
2 parents 1b4ef04 + b46a972 commit 6b80b65
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/copydirsync_unix.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);

Expand All @@ -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);

Expand Down

0 comments on commit 6b80b65

Please sign in to comment.