From 74efea03bf1994a770cac2a745cf16f053eb0121 Mon Sep 17 00:00:00 2001 From: Artur Adib Date: Tue, 27 Mar 2012 11:32:41 -0400 Subject: [PATCH] test rm() with absolute path --- test/rm.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/rm.js b/test/rm.js index e62433e..732950c 100644 --- a/test/rm.js +++ b/test/rm.js @@ -58,6 +58,13 @@ shell.rm('-Rf', 'tmp/a'); assert.equal(shell.error(), null); assert.equal(fs.existsSync('tmp/a'), false); +// recursive dir removal - absolute path +shell.mkdir('-p', 'tmp/a/b/c'); +assert.equal(fs.existsSync('tmp/a/b/c'), true); +shell.rm('-Rf', path.resolve('./tmp/a')); +assert.equal(shell.error(), null); +assert.equal(fs.existsSync('tmp/a'), false); + // wildcard shell.cp('-f', 'resources/file*', 'tmp'); assert.equal(shell.error(), null);