aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHugo Levy-Falk <hugo@klafyvel.me>2026-07-13 22:38:15 +0200
committerHisham Muhammad <hisham@gobolinux.org>2026-07-16 17:47:50 -0300
commitfd2d11bb33c35992a4d9b6f6d0c38b888eae8b7f (patch)
treef74445585659a709501d09bee28cfa87728a0fd5 /spec
parent066af7cf748dbc15e2d7dd82894c8f0a2fc8039e (diff)
downloadluarocks-fd2d11bb33c35992a4d9b6f6d0c38b888eae8b7f.tar.gz
luarocks-fd2d11bb33c35992a4d9b6f6d0c38b888eae8b7f.tar.bz2
luarocks-fd2d11bb33c35992a4d9b6f6d0c38b888eae8b7f.zip
tests: Add lint pass on the created rockspecs for the write_rockspec command.
Diffstat (limited to 'spec')
-rw-r--r--spec/write_rockspec_spec.lua22
1 files changed, 7 insertions, 15 deletions
diff --git a/spec/write_rockspec_spec.lua b/spec/write_rockspec_spec.lua
index 7a8554bb..2ade5986 100644
--- a/spec/write_rockspec_spec.lua
+++ b/spec/write_rockspec_spec.lua
@@ -55,21 +55,13 @@ describe("luarocks ##write_rockspec tests #integration", function()
55 -- TODO check contents 55 -- TODO check contents
56 end) 56 end)
57 57
58 local formats = { 58 it("runs with format flag", function()
59 "1.0", 59 finally(function() os.remove("testrock-dev-1.rockspec") end)
60 "1.1", 60 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --rockspec-format=1.1 --lua-versions=5.1,5.2"))
61 "3.0", 61 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec"))
62 "3.1", 62 assert.truthy(run.luarocks_bool("lint " .. "testrock-dev-1.rockspec"))
63 } 63 -- TODO check contents
64 for i, format in ipairs(formats) do 64 end)
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
73 65
74 it("runs with full flags", function() 66 it("runs with full flags", function()
75 finally(function() os.remove("testrock-dev-1.rockspec") end) 67 finally(function() os.remove("testrock-dev-1.rockspec") end)