diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/fs_spec.lua | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/spec/fs_spec.lua b/spec/fs_spec.lua index b36fded3..a74980f3 100644 --- a/spec/fs_spec.lua +++ b/spec/fs_spec.lua | |||
@@ -564,9 +564,6 @@ describe("Luarocks fs test #whitebox #w_fs", function() | |||
564 | fd:close() | 564 | fd:close() |
565 | dstdir = os.tmpname() | 565 | dstdir = os.tmpname() |
566 | os.remove(dstdir) | 566 | os.remove(dstdir) |
567 | if is_win then | ||
568 | lfs.mkdir(dstdir) | ||
569 | end | ||
570 | end | 567 | end |
571 | 568 | ||
572 | it("returns true and copies the contents (with their permissions) of the source dir to the destination dir", function() | 569 | it("returns true and copies the contents (with their permissions) of the source dir to the destination dir", function() |
@@ -604,11 +601,7 @@ describe("Luarocks fs test #whitebox #w_fs", function() | |||
604 | os.remove(srcdir) | 601 | os.remove(srcdir) |
605 | dstdir = os.tmpname() | 602 | dstdir = os.tmpname() |
606 | os.remove(dstdir) | 603 | os.remove(dstdir) |
607 | if is_win then | 604 | assert.falsy(fs.copy_contents(srcdir, dstdir, nil)) |
608 | fs.copy_contents(srcdir, dstdir, nil) | ||
609 | else | ||
610 | assert.falsy(pcall(fs.copy_contents, srcdir, dstdir, nil)) | ||
611 | end | ||
612 | assert.falsy(exists_file(dstdir)) | 605 | assert.falsy(exists_file(dstdir)) |
613 | end) | 606 | end) |
614 | 607 | ||
@@ -619,18 +612,14 @@ describe("Luarocks fs test #whitebox #w_fs", function() | |||
619 | fd:close() | 612 | fd:close() |
620 | dstdir = os.tmpname() | 613 | dstdir = os.tmpname() |
621 | os.remove(dstdir) | 614 | os.remove(dstdir) |
622 | if is_win then | 615 | assert.falsy(fs.copy_contents(srcdir, dstdir, nil)) |
623 | fs.copy_contents(srcdir, dstdir, nil) | ||
624 | else | ||
625 | assert.falsy(pcall(fs.copy_contents, srcdir, dstdir, nil)) | ||
626 | end | ||
627 | assert.falsy(exists_file(dstdir)) | 616 | assert.falsy(exists_file(dstdir)) |
628 | end) | 617 | end) |
629 | 618 | ||
630 | it("returns false and does nothing if the source dir doesn't have the proper permissions #unix", function() | 619 | it("returns false and does nothing if the source dir doesn't have the proper permissions #unix", function() |
631 | create_dir_tree() | 620 | create_dir_tree() |
632 | assert(fs.chmod(srcdir, "333")) | 621 | assert(fs.chmod(srcdir, "333")) |
633 | assert.falsy(pcall(fs.copy_contents, srcdir, dstdir, nil)) | 622 | assert.falsy(fs.copy_contents(srcdir, dstdir, nil)) |
634 | assert.falsy(exists_file(dstdir)) | 623 | assert.falsy(exists_file(dstdir)) |
635 | end) | 624 | end) |
636 | end) | 625 | end) |