зеркало из https://github.com/microsoft/shelljs.git
test rm() with absolute path
This commit is contained in:
Родитель
67585347c0
Коммит
74efea03bf
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче