aboutsummaryrefslogtreecommitdiff
path: root/spec/make_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/make_spec.lua')
-rw-r--r--spec/make_spec.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/make_spec.lua b/spec/make_spec.lua
index c9410cce..791eeb89 100644
--- a/spec/make_spec.lua
+++ b/spec/make_spec.lua
@@ -38,7 +38,7 @@ describe("luarocks make #integration", function()
38 test_env.remove_dir("luasocket-3.0rc1-2") 38 test_env.remove_dir("luasocket-3.0rc1-2")
39 os.remove("luasocket-3.0rc1-2.src.rock") 39 os.remove("luasocket-3.0rc1-2.src.rock")
40 end) 40 end)
41 41
42 -- make luasocket 42 -- make luasocket
43 assert.is_true(run.luarocks_bool("download --source luasocket 3.0rc1-2")) 43 assert.is_true(run.luarocks_bool("download --source luasocket 3.0rc1-2"))
44 assert.is_true(run.luarocks_bool("unpack luasocket-3.0rc1-2.src.rock")) 44 assert.is_true(run.luarocks_bool("unpack luasocket-3.0rc1-2.src.rock"))
@@ -85,13 +85,13 @@ describe("luarocks make #integration", function()
85 assert.is_true(run.luarocks_bool("unpack lxsh-0.8.6-2.src.rock")) 85 assert.is_true(run.luarocks_bool("unpack lxsh-0.8.6-2.src.rock"))
86 assert.is_true(lfs.chdir("lxsh-0.8.6-2/lxsh-0.8.6-1/")) 86 assert.is_true(lfs.chdir("lxsh-0.8.6-2/lxsh-0.8.6-1/"))
87 end) 87 end)
88 88
89 -- delete downloaded and unpacked files 89 -- delete downloaded and unpacked files
90 after_each(function() 90 after_each(function()
91 assert(lfs.chdir(testing_paths.testrun_dir)) 91 assert(lfs.chdir(testing_paths.testrun_dir))
92 test_env.remove_dir("lxsh-0.8.6-2") 92 test_env.remove_dir("lxsh-0.8.6-2")
93 assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) 93 assert.is_true(os.remove("lxsh-0.8.6-2.src.rock"))
94 end) 94 end)
95 95
96 it("default rockspec", function() 96 it("default rockspec", function()
97 assert.is_true(run.luarocks_bool("new_version lxsh-0.8.6-2.rockspec")) 97 assert.is_true(run.luarocks_bool("new_version lxsh-0.8.6-2.rockspec"))
@@ -105,14 +105,14 @@ describe("luarocks make #integration", function()
105 finally(function() 105 finally(function()
106 os.remove("rockspec") 106 os.remove("rockspec")
107 end) 107 end)
108 108
109 test_env.copy("lxsh-0.8.6-2.rockspec", "rockspec") 109 test_env.copy("lxsh-0.8.6-2.rockspec", "rockspec")
110 assert.is_true(run.luarocks_bool("make")) 110 assert.is_true(run.luarocks_bool("make"))
111 111
112 assert.is_true(run.luarocks_bool("show lxsh")) 112 assert.is_true(run.luarocks_bool("show lxsh"))
113 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 113 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
114 end) 114 end)
115 115
116 it("ambiguous rockspec", function() 116 it("ambiguous rockspec", function()
117 assert.is.truthy(os.rename("lxsh-0.8.6-2.rockspec", "lxsh2-0.8.6-2.rockspec")) 117 assert.is.truthy(os.rename("lxsh-0.8.6-2.rockspec", "lxsh2-0.8.6-2.rockspec"))
118 local output = run.luarocks("make") 118 local output = run.luarocks("make")
@@ -131,7 +131,7 @@ describe("luarocks make #integration", function()
131 assert.is_false(run.luarocks_bool("show lxsh")) 131 assert.is_false(run.luarocks_bool("show lxsh"))
132 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 132 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
133 end) 133 end)
134 134
135 it("pack binary rock", function() 135 it("pack binary rock", function()
136 assert.is_true(run.luarocks_bool("make --deps-mode=none --pack-binary-rock")) 136 assert.is_true(run.luarocks_bool("make --deps-mode=none --pack-binary-rock"))
137 assert.is.truthy(lfs.attributes("lxsh-0.8.6-2.all.rock")) 137 assert.is.truthy(lfs.attributes("lxsh-0.8.6-2.all.rock"))
@@ -150,7 +150,7 @@ describe("luarocks make #integration", function()
150 "a_rock 1.0" 150 "a_rock 1.0"
151 } 151 }
152 build = { 152 build = {
153 type = "builtin", 153 type = "builtin",
154 modules = { 154 modules = {
155 test = "test.lua" 155 test = "test.lua"
156 } 156 }
@@ -185,7 +185,7 @@ describe("luarocks make #integration", function()
185 "a_rock >= 0.8" 185 "a_rock >= 0.8"
186 } 186 }
187 build = { 187 build = {
188 type = "builtin", 188 type = "builtin",
189 modules = { 189 modules = {
190 test = "test.lua" 190 test = "test.lua"
191 } 191 }
@@ -226,7 +226,7 @@ describe("luarocks make #integration", function()
226 "a_rock >= 0.8" 226 "a_rock >= 0.8"
227 } 227 }
228 build = { 228 build = {
229 type = "builtin", 229 type = "builtin",
230 modules = { 230 modules = {
231 test = "test.lua" 231 test = "test.lua"
232 } 232 }
@@ -260,7 +260,7 @@ describe("luarocks make #integration", function()
260 local deploy_lib_dir = testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION 260 local deploy_lib_dir = testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION
261 local deploy_lua_dir = testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION 261 local deploy_lua_dir = testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION
262 local so = test_env.lib_extension 262 local so = test_env.lib_extension
263 263
264 before_each(function() 264 before_each(function()
265 test_env.copy_dir(testing_paths.fixtures_dir .. "/double_deploy_type", "ddt") 265 test_env.copy_dir(testing_paths.fixtures_dir .. "/double_deploy_type", "ddt")
266 end) 266 end)
@@ -279,7 +279,7 @@ describe("luarocks make #integration", function()
279 assert.is.falsy(lfs.attributes(deploy_lib_dir.."/ddt."..so.."~")) 279 assert.is.falsy(lfs.attributes(deploy_lib_dir.."/ddt."..so.."~"))
280 assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt.lua~")) 280 assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt.lua~"))
281 assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt_file~")) 281 assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt_file~"))
282 282
283 assert.is_true(run.luarocks_bool("make ddt/double_deploy_type-0.2.0-1.rockspec")) 283 assert.is_true(run.luarocks_bool("make ddt/double_deploy_type-0.2.0-1.rockspec"))
284 assert.is.truthy(lfs.attributes(deploy_lib_dir.."/ddt."..so)) 284 assert.is.truthy(lfs.attributes(deploy_lib_dir.."/ddt."..so))
285 assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt.lua")) 285 assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt.lua"))