mirror of
https://github.com/shelljs/shelljs.git
synced 2026-01-25 16:07:37 +00:00
Update broken tests with new cp behavior
This commit is contained in:
parent
9c8db201ca
commit
5b7bbe8d8b
@ -125,14 +125,14 @@ assert.equal(shell.cat('resources/cp/dir_a/z'), shell.cat('tmp/cp/dir_a/z')); //
|
||||
|
||||
//recursive, creates dest dir since it's only one level deep (see Github issue #44)
|
||||
shell.rm('-rf', 'tmp/*');
|
||||
shell.cp('-r', 'resources/issue44/*', 'tmp/dir2');
|
||||
shell.cp('-r', 'resources/issue44', 'tmp/dir2');
|
||||
assert.equal(shell.error(), null);
|
||||
assert.equal(shell.ls('-R', 'resources/issue44') + '', shell.ls('-R', 'tmp/dir2') + '');
|
||||
assert.equal(shell.cat('resources/issue44/main.js'), shell.cat('tmp/dir2/main.js'));
|
||||
|
||||
//recursive, does *not* create dest dir since it's too deep (see Github issue #44)
|
||||
shell.rm('-rf', 'tmp/*');
|
||||
shell.cp('-r', 'resources/issue44/*', 'tmp/dir2/dir3');
|
||||
shell.cp('-r', 'resources/issue44', 'tmp/dir2/dir3');
|
||||
assert.ok(shell.error());
|
||||
assert.equal(fs.existsSync('tmp/dir2'), false);
|
||||
|
||||
|
||||
@ -179,6 +179,7 @@ assert.equal(fs.existsSync('tmp/tree4'), false);
|
||||
|
||||
// remove symbolic link to a dir
|
||||
shell.rm('-rf', 'tmp');
|
||||
shell.mkdir('tmp');
|
||||
shell.cp('-R', 'resources/rm', 'tmp');
|
||||
shell.rm('-f', 'tmp/rm/link_to_a_dir');
|
||||
assert.equal(shell.error(), null);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user