aboutsummaryrefslogtreecommitdiff
path: root/spec/write_rockspec_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/write_rockspec_spec.lua')
-rw-r--r--spec/write_rockspec_spec.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/write_rockspec_spec.lua b/spec/write_rockspec_spec.lua
index abd5c80b..2ade5986 100644
--- a/spec/write_rockspec_spec.lua
+++ b/spec/write_rockspec_spec.lua
@@ -3,7 +3,7 @@ local git_repo = require("spec.util.git_repo")
3local lfs = require("lfs") 3local lfs = require("lfs")
4local run = test_env.run 4local run = test_env.run
5 5
6describe("luarocks write_rockspec tests #integration", function() 6describe("luarocks ##write_rockspec tests #integration", function()
7 7
8 lazy_setup(function() 8 lazy_setup(function()
9 test_env.setup_specs() 9 test_env.setup_specs()
@@ -39,12 +39,13 @@ describe("luarocks write_rockspec tests #integration", function()
39 lfs.chdir("testrock") 39 lfs.chdir("testrock")
40 assert.is_true(run.luarocks_bool("write_rockspec")) 40 assert.is_true(run.luarocks_bool("write_rockspec"))
41 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec")) 41 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec"))
42 assert.truthy(run.luarocks_bool("lint " .. d .. "/testrock-dev-1.rockspec"))
42 end) 43 end)
43 44
44 it("runs", function() 45 it("runs", function()
45 finally(function() os.remove("testrock-dev-1.rockspec") end) 46 finally(function() os.remove("testrock-dev-1.rockspec") end)
46 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock")) 47 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock"))
47 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec")) 48 assert.truthy(run.luarocks_bool("lint " .. "testrock-dev-1.rockspec"))
48 end) 49 end)
49 50
50 it("runs with --tag", function() 51 it("runs with --tag", function()
@@ -58,6 +59,7 @@ describe("luarocks write_rockspec tests #integration", function()
58 finally(function() os.remove("testrock-dev-1.rockspec") end) 59 finally(function() os.remove("testrock-dev-1.rockspec") end)
59 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --rockspec-format=1.1 --lua-versions=5.1,5.2")) 60 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --rockspec-format=1.1 --lua-versions=5.1,5.2"))
60 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec")) 61 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec"))
62 assert.truthy(run.luarocks_bool("lint " .. "testrock-dev-1.rockspec"))
61 -- TODO check contents 63 -- TODO check contents
62 end) 64 end)
63 65
@@ -66,6 +68,7 @@ describe("luarocks write_rockspec tests #integration", function()
66 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --lua-versions=5.1,5.2 --license=\"MIT/X11\" " 68 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --lua-versions=5.1,5.2 --license=\"MIT/X11\" "
67 .. " --homepage=\"http://www.luarocks.org\" --summary=\"A package manager for Lua modules\" ")) 69 .. " --homepage=\"http://www.luarocks.org\" --summary=\"A package manager for Lua modules\" "))
68 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec")) 70 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec"))
71 assert.truthy(run.luarocks_bool("lint " .. "testrock-dev-1.rockspec"))
69 -- TODO check contents 72 -- TODO check contents
70 end) 73 end)
71 74
@@ -73,6 +76,7 @@ describe("luarocks write_rockspec tests #integration", function()
73 finally(function() os.remove("testrock-dev-1.rockspec") end) 76 finally(function() os.remove("testrock-dev-1.rockspec") end)
74 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --lib=fcgi --license=\"3-clause BSD\" " .. "--lua-versions=5.1,5.2")) 77 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --lib=fcgi --license=\"3-clause BSD\" " .. "--lua-versions=5.1,5.2"))
75 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec")) 78 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec"))
79 assert.truthy(run.luarocks_bool("lint " .. "testrock-dev-1.rockspec"))
76 -- TODO check contents 80 -- TODO check contents
77 end) 81 end)
78 end) 82 end)
@@ -91,6 +95,7 @@ describe("luarocks write_rockspec tests #integration", function()
91 finally(function() os.remove("an_upstream_tarball-0.1-1.rockspec") end) 95 finally(function() os.remove("an_upstream_tarball-0.1-1.rockspec") end)
92 assert.is_true(run.luarocks_bool("write_rockspec http://localhost:8080/file/an_upstream_tarball-0.1.tar.gz --lua-versions=5.1")) 96 assert.is_true(run.luarocks_bool("write_rockspec http://localhost:8080/file/an_upstream_tarball-0.1.tar.gz --lua-versions=5.1"))
93 assert.is.truthy(lfs.attributes("an_upstream_tarball-0.1-1.rockspec")) 97 assert.is.truthy(lfs.attributes("an_upstream_tarball-0.1-1.rockspec"))
98 assert.truthy(run.luarocks_bool("lint " .. "an_upstream_tarball-0.1-1.rockspec"))
94 -- TODO check contents 99 -- TODO check contents
95 end) 100 end)
96 101
@@ -98,6 +103,7 @@ describe("luarocks write_rockspec tests #integration", function()
98 finally(function() os.remove("renamed_upstream_tarball-0.1-1.rockspec") end) 103 finally(function() os.remove("renamed_upstream_tarball-0.1-1.rockspec") end)
99 assert.is_true(run.luarocks_bool("write_rockspec http://localhost:8080/file/renamed_upstream_tarball-0.1.tar.gz --lua-versions=5.1")) 104 assert.is_true(run.luarocks_bool("write_rockspec http://localhost:8080/file/renamed_upstream_tarball-0.1.tar.gz --lua-versions=5.1"))
100 assert.is.truthy(lfs.attributes("renamed_upstream_tarball-0.1-1.rockspec")) 105 assert.is.truthy(lfs.attributes("renamed_upstream_tarball-0.1-1.rockspec"))
106 assert.truthy(run.luarocks_bool("lint " .. "renamed_upstream_tarball-0.1-1.rockspec"))
101 -- TODO check contents 107 -- TODO check contents
102 end) 108 end)
103 end) 109 end)