From 9c8db201caaebc02feb416d268ead119cbd31aef Mon Sep 17 00:00:00 2001 From: Brandon Freitag Date: Wed, 6 Jan 2016 21:30:38 -0800 Subject: [PATCH] Add test for added cp behavior --- test/cp.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/cp.js b/test/cp.js index 42cb095..8832ee1 100644 --- a/test/cp.js +++ b/test/cp.js @@ -136,6 +136,12 @@ shell.cp('-r', 'resources/issue44/*', 'tmp/dir2/dir3'); assert.ok(shell.error()); assert.equal(fs.existsSync('tmp/dir2'), false); +//recursive, creates dest dir, implicitly copies contents of source dir +shell.rm('-rf', 'tmp/*'); +shell.cp('-r', 'resources/cp/dir_a', 'tmp/dest'); +assert.equal(shell.error(), null); +assert.equal(fs.existsSync('tmp/dest/z'), true); + //preserve mode bits shell.rm('-rf', 'tmp/*'); var execBit = parseInt('001', 8);