Permalink
Browse files

Add unit test for same name, different directory

  • Loading branch information...
1 parent e403d6c commit c7a239e97e5080fdac46a9d4f0406e27d32b47f6 @kwarismian kwarismian committed Jan 31, 2014
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/file.js
View
10 test/file.js
@@ -57,6 +57,16 @@ tests = {
assert.equal('foo', res[0]);
fs.rmdirSync('foo');
}
+
+, 'test cpR with same name and different directory': function () {
+ file.mkdirP('foo', {silent: true});
+ fs.writeFileSync('foo/bar.txt', 'w00t');
+ file.cpR('foo', 'bar', {silent: true});
+ assert.ok(existsSync('bar/bar.txt'));
+ file.rmRf('foo', {silent: true});
+ file.rmRf('bar', {silent: true});
+
+ }
, 'test cpR with same to and from will throw': function () {
assert.throws(function () {

0 comments on commit c7a239e

Please sign in to comment.