diff options
Diffstat (limited to 'spec/write_rockspec_spec.lua')
| -rw-r--r-- | spec/write_rockspec_spec.lua | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/spec/write_rockspec_spec.lua b/spec/write_rockspec_spec.lua index 2ade5986..7a8554bb 100644 --- a/spec/write_rockspec_spec.lua +++ b/spec/write_rockspec_spec.lua | |||
| @@ -55,13 +55,21 @@ describe("luarocks ##write_rockspec tests #integration", function() | |||
| 55 | -- TODO check contents | 55 | -- TODO check contents |
| 56 | end) | 56 | end) |
| 57 | 57 | ||
| 58 | it("runs with format flag", function() | 58 | local formats = { |
| 59 | finally(function() os.remove("testrock-dev-1.rockspec") end) | 59 | "1.0", |
| 60 | assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --rockspec-format=1.1 --lua-versions=5.1,5.2")) | 60 | "1.1", |
| 61 | assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec")) | 61 | "3.0", |
| 62 | assert.truthy(run.luarocks_bool("lint " .. "testrock-dev-1.rockspec")) | 62 | "3.1", |
| 63 | -- TODO check contents | 63 | } |
| 64 | end) | 64 | for i, format in ipairs(formats) do |
| 65 | it("runs with format flag " .. format, function() | ||
| 66 | finally(function() os.remove("testrock-dev-1.rockspec") end) | ||
| 67 | assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --rockspec-format=" .. format .. " --lua-versions=5.1,5.2")) | ||
| 68 | assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec")) | ||
| 69 | assert.truthy(run.luarocks_bool("lint " .. "testrock-dev-1.rockspec")) | ||
| 70 | -- TODO check contents | ||
| 71 | end) | ||
| 72 | end | ||
| 65 | 73 | ||
| 66 | it("runs with full flags", function() | 74 | it("runs with full flags", function() |
| 67 | finally(function() os.remove("testrock-dev-1.rockspec") end) | 75 | finally(function() os.remove("testrock-dev-1.rockspec") end) |
