diff options
-rw-r--r-- | spec/fetch_spec.lua | 1 | ||||
-rw-r--r-- | spec/fs_spec.lua | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/spec/fetch_spec.lua b/spec/fetch_spec.lua index b878c1e6..83797480 100644 --- a/spec/fetch_spec.lua +++ b/spec/fetch_spec.lua | |||
@@ -439,6 +439,7 @@ describe("Luarocks fetch test #unit #mock", function() | |||
439 | 439 | ||
440 | it("from #git", function() | 440 | it("from #git", function() |
441 | local rockspec, err = rockspecs.from_persisted_table("testrock-dev-1.rockspec", { | 441 | local rockspec, err = rockspecs.from_persisted_table("testrock-dev-1.rockspec", { |
442 | rockspec_format = "3.0", | ||
442 | package = "testrock", | 443 | package = "testrock", |
443 | version = "dev-1", | 444 | version = "dev-1", |
444 | source = { | 445 | source = { |
diff --git a/spec/fs_spec.lua b/spec/fs_spec.lua index 3f115df9..08923f37 100644 --- a/spec/fs_spec.lua +++ b/spec/fs_spec.lua | |||
@@ -789,7 +789,7 @@ describe("Luarocks fs test #unit", function() | |||
789 | create_file(srcfile, srccontent) | 789 | create_file(srcfile, srccontent) |
790 | dstfile = get_tmp_path() | 790 | dstfile = get_tmp_path() |
791 | assert.truthy(fs.copy(srcfile, dstfile)) | 791 | assert.truthy(fs.copy(srcfile, dstfile)) |
792 | fd = assert(io.open(dstfile, "r")) | 792 | local fd = assert(io.open(dstfile, "r")) |
793 | local dstcontent = fd:read("*a") | 793 | local dstcontent = fd:read("*a") |
794 | assert.same("foo", dstcontent) | 794 | assert.same("foo", dstcontent) |
795 | if posix_ok then | 795 | if posix_ok then |
@@ -802,7 +802,7 @@ describe("Luarocks fs test #unit", function() | |||
802 | create_file(srcfile, srccontent) | 802 | create_file(srcfile, srccontent) |
803 | dstfile = get_tmp_path() | 803 | dstfile = get_tmp_path() |
804 | assert.truthy(fs.copy(srcfile, dstfile, "exec")) | 804 | assert.truthy(fs.copy(srcfile, dstfile, "exec")) |
805 | fd = assert(io.open(dstfile, "r")) | 805 | local fd = assert(io.open(dstfile, "r")) |
806 | local dstcontent = fd:read("*a") | 806 | local dstcontent = fd:read("*a") |
807 | assert.same("foo", dstcontent) | 807 | assert.same("foo", dstcontent) |
808 | end) | 808 | end) |
@@ -1060,7 +1060,7 @@ describe("Luarocks fs test #unit", function() | |||
1060 | assert.truthy(fs.move(srcfile, dstfile)) | 1060 | assert.truthy(fs.move(srcfile, dstfile)) |
1061 | assert.truthy(fs.exists(dstfile)) | 1061 | assert.truthy(fs.exists(dstfile)) |
1062 | assert.falsy(fs.exists(srcfile)) | 1062 | assert.falsy(fs.exists(srcfile)) |
1063 | fd = assert(io.open(dstfile, "r")) | 1063 | local fd = assert(io.open(dstfile, "r")) |
1064 | local dstcontents = assert(fd:read("*a")) | 1064 | local dstcontents = assert(fd:read("*a")) |
1065 | assert.same(dstcontents, "foo") | 1065 | assert.same(dstcontents, "foo") |
1066 | if posix_ok then | 1066 | if posix_ok then |
@@ -1075,7 +1075,7 @@ describe("Luarocks fs test #unit", function() | |||
1075 | assert.truthy(fs.move(srcfile, dstfile, "read")) | 1075 | assert.truthy(fs.move(srcfile, dstfile, "read")) |
1076 | assert.truthy(fs.exists(dstfile)) | 1076 | assert.truthy(fs.exists(dstfile)) |
1077 | assert.falsy(fs.exists(srcfile)) | 1077 | assert.falsy(fs.exists(srcfile)) |
1078 | fd = assert(io.open(dstfile, "r")) | 1078 | local fd = assert(io.open(dstfile, "r")) |
1079 | local dstcontents = assert(fd:read("*a")) | 1079 | local dstcontents = assert(fd:read("*a")) |
1080 | assert.same(dstcontents, "foo") | 1080 | assert.same(dstcontents, "foo") |
1081 | end) | 1081 | end) |
@@ -1093,7 +1093,7 @@ describe("Luarocks fs test #unit", function() | |||
1093 | create_file(dstfile, "bar") | 1093 | create_file(dstfile, "bar") |
1094 | assert.falsy(fs.move(srcfile, dstfile)) | 1094 | assert.falsy(fs.move(srcfile, dstfile)) |
1095 | assert.truthy(fs.exists(srcfile)) | 1095 | assert.truthy(fs.exists(srcfile)) |
1096 | fd = assert(io.open(dstfile, "r")) | 1096 | local fd = assert(io.open(dstfile, "r")) |
1097 | local dstcontents = assert(fd:read("*a")) | 1097 | local dstcontents = assert(fd:read("*a")) |
1098 | assert.same(dstcontents, "bar") | 1098 | assert.same(dstcontents, "bar") |
1099 | end) | 1099 | end) |