1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
|
local test_env = require("spec.util.test_env")
local lfs = require("lfs")
local run = test_env.run
local testing_paths = test_env.testing_paths
local env_variables = test_env.env_variables
local write_file = test_env.write_file
local extra_rocks = {
"/luasocket-${LUASOCKET}.src.rock",
"/luasocket-${LUASOCKET}.rockspec",
"/lpeg-${LPEG}.src.rock",
"/lxsh-${LXSH}.src.rock",
"/lxsh-${LXSH}.rockspec"
}
describe("luarocks make #integration", function()
before_each(function()
test_env.setup_specs(extra_rocks)
end)
it("with no flags/arguments", function()
finally(function()
lfs.chdir(testing_paths.testrun_dir)
test_env.remove_dir("empty")
end)
assert(lfs.mkdir("empty"))
assert(lfs.chdir("empty"))
assert.is_false(run.luarocks_bool("make"))
end)
it("with rockspec", function()
finally(function()
-- delete downloaded and unpacked files
lfs.chdir(testing_paths.testrun_dir)
test_env.remove_dir("luasocket-${LUASOCKET}")
os.remove("luasocket-${LUASOCKET}.src.rock")
end)
-- make luasocket
assert.is_true(run.luarocks_bool("download --source luasocket ${LUASOCKET}"))
assert.is_true(run.luarocks_bool("unpack luasocket-${LUASOCKET}.src.rock"))
lfs.chdir("luasocket-${LUASOCKET}/luasocket/")
assert.is_true(run.luarocks_bool("make luasocket-${LUASOCKET}.rockspec"))
-- test it
assert.is_true(run.luarocks_bool("show luasocket"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket/${LUASOCKET}/luasocket-${LUASOCKET}.rockspec"))
end)
it("--no-doc", function()
finally(function()
lfs.chdir(testing_paths.testrun_dir)
test_env.remove_dir("luasocket-${LUASOCKET}")
os.remove("luasocket-${LUASOCKET}.src.rock")
end)
assert.is_true(run.luarocks_bool("download --source luasocket ${LUASOCKET}"))
assert.is_true(run.luarocks_bool("unpack luasocket-${LUASOCKET}.src.rock"))
lfs.chdir("luasocket-${LUASOCKET}/luasocket")
assert.is_true(run.luarocks_bool("make --no-doc luasocket-${LUASOCKET}.rockspec"))
assert.is_true(run.luarocks_bool("show luasocket"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket/${LUASOCKET}/doc"))
end)
it("--only-deps", function()
local rockspec = "build_only_deps-0.1-1.rockspec"
local src_rock = testing_paths.fixtures_dir .. "/build_only_deps-0.1-1.src.rock"
test_env.remove_dir("build_only_deps-0.1-1/")
assert.is_true(run.luarocks_bool("unpack " .. src_rock))
lfs.chdir("build_only_deps-0.1-1/")
assert.is_true(run.luarocks_bool("make " .. rockspec .. " --only-deps"))
assert.is_false(run.luarocks_bool("show build_only_deps"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/build_only_deps/0.1-1/build_only_deps-0.1-1.rockspec"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/a_rock/1.0-1/a_rock-1.0-1.rockspec"))
end)
describe("LuaRocks making rockspecs (using lxsh)", function()
--download lxsh and unpack it
before_each(function()
assert.is_true(run.luarocks_bool("download --source lxsh ${LXSH}"))
assert.is_true(run.luarocks_bool("unpack lxsh-${LXSH}.src.rock"))
assert.is_true(lfs.chdir("lxsh-${LXSH}/lxsh-${LXSH_V}-1/"))
end)
-- delete downloaded and unpacked files
after_each(function()
assert(lfs.chdir(testing_paths.testrun_dir))
test_env.remove_dir("lxsh-${LXSH}")
assert.is_true(os.remove("lxsh-${LXSH}.src.rock"))
end)
it("default rockspec", function()
assert.is_true(run.luarocks_bool("new_version lxsh-${LXSH}.rockspec"))
assert.is_true(run.luarocks_bool("make"))
assert.is_true(run.luarocks_bool("show lxsh"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/${LXSH_V}-3/lxsh-${LXSH_V}-3.rockspec"))
end)
it("unnamed rockspec", function()
finally(function()
os.remove("rockspec")
end)
test_env.copy("lxsh-${LXSH}.rockspec", "rockspec")
assert.is_true(run.luarocks_bool("make"))
assert.is_true(run.luarocks_bool("show lxsh"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/${LXSH}/lxsh-${LXSH}.rockspec"))
end)
it("ambiguous rockspec", function()
assert.is.truthy(os.rename("lxsh-${LXSH}.rockspec", "lxsh2-${LXSH}.rockspec"))
local output = run.luarocks("make")
assert.is.truthy(output:match("Error: Inconsistency between rockspec filename"))
assert.is_false(run.luarocks_bool("show lxsh"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/${LXSH}/lxsh-${LXSH}.rockspec"))
end)
it("ambiguous unnamed rockspec", function()
assert.is.truthy(os.rename("lxsh-${LXSH}.rockspec", "1_rockspec"))
test_env.copy("1_rockspec", "2_rockspec")
local output = run.luarocks("make")
assert.is.truthy(output:match("Error: Please specify which rockspec file to use"))
assert.is_false(run.luarocks_bool("show lxsh"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/${LXSH}/lxsh-${LXSH}.rockspec"))
end)
it("pack binary rock", function()
assert.is_true(run.luarocks_bool("make --deps-mode=none --pack-binary-rock"))
assert.is.truthy(lfs.attributes("lxsh-${LXSH}.all.rock"))
end)
end)
it("supports --pin #pinning", function()
test_env.run_in_tmp(function(tmpdir)
write_file("test-1.0-1.rockspec", [[
package = "test"
version = "1.0-1"
source = {
url = "file://]] .. tmpdir:gsub("\\", "/") .. [[/test.lua"
}
dependencies = {
"a_rock 1.0"
}
build = {
type = "builtin",
modules = {
test = "test.lua"
}
}
]])
write_file("test.lua", "return {}")
assert.is_true(run.luarocks_bool("make --server=" .. testing_paths.fixtures_dir .. "/a_repo --pin --tree=lua_modules"))
assert.is.truthy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/test/1.0-1/test-1.0-1.rockspec"))
assert.is.truthy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/a_rock/1.0-1/a_rock-1.0-1.rockspec"))
local lockfilename = "./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/test/1.0-1/luarocks.lock"
assert.is.truthy(lfs.attributes(lockfilename))
local lockdata = loadfile(lockfilename)()
assert.same({
dependencies = {
["a_rock"] = "1.0-1",
["lua"] = test_env.lua_version .. "-1",
}
}, lockdata)
end, finally)
end)
it("respects luarocks.lock when present #pinning", function()
test_env.run_in_tmp(function(tmpdir)
write_file("test-2.0-1.rockspec", [[
package = "test"
version = "2.0-1"
source = {
url = "file://]] .. tmpdir:gsub("\\", "/") .. [[/test.lua"
}
dependencies = {
"a_rock >= 0.8"
}
build = {
type = "builtin",
modules = {
test = "test.lua"
}
}
]])
write_file("test.lua", "return {}")
write_file("luarocks.lock", [[
return {
dependencies = {
["a_rock"] = "1.0-1",
}
}
]])
print(run.luarocks("make --server=" .. testing_paths.fixtures_dir .. "/a_repo --tree=lua_modules"))
assert.is.truthy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/test/2.0-1/test-2.0-1.rockspec"))
assert.is.truthy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/a_rock/1.0-1/a_rock-1.0-1.rockspec"))
local lockfilename = "./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/test/2.0-1/luarocks.lock"
assert.is.truthy(lfs.attributes(lockfilename))
local lockdata = loadfile(lockfilename)()
assert.same({
dependencies = {
["a_rock"] = "1.0-1",
}
}, lockdata)
end, finally)
end)
describe("#ddt upgrading rockspecs with double deploy types", function()
local deploy_lib_dir = testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION
local deploy_lua_dir = testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION
local so = test_env.lib_extension
before_each(function()
test_env.copy_dir(testing_paths.fixtures_dir .. "/double_deploy_type", "ddt")
end)
after_each(function()
test_env.remove_dir("ddt")
os.remove("ddt."..test_env.lib_extension)
end)
it("when upgrading", function()
assert.is_true(run.luarocks_bool("make ddt/double_deploy_type-0.1.0-1.rockspec"))
assert.is.truthy(lfs.attributes(deploy_lib_dir.."/ddt."..so))
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt.lua"))
assert.same("ddt1", loadfile(deploy_lua_dir.."/ddt.lua")())
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt_file"))
assert.is.falsy(lfs.attributes(deploy_lib_dir.."/ddt."..so.."~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt.lua~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt_file~"))
assert.is_true(run.luarocks_bool("make ddt/double_deploy_type-0.2.0-1.rockspec"))
assert.is.truthy(lfs.attributes(deploy_lib_dir.."/ddt."..so))
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt.lua"))
assert.same("ddt2", loadfile(deploy_lua_dir.."/ddt.lua")())
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt_file"))
assert.is.falsy(lfs.attributes(deploy_lib_dir.."/ddt."..so.."~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt.lua~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt_file~"))
end)
it("modules with same name from lua/ and lib/ when upgrading with --keep", function()
assert.is_true(run.luarocks_bool("make ddt/double_deploy_type-0.1.0-1.rockspec"))
assert.is.truthy(lfs.attributes(deploy_lib_dir.."/ddt."..so))
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt.lua"))
assert.same("ddt1", loadfile(deploy_lua_dir.."/ddt.lua")())
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt_file"))
assert.is.falsy(lfs.attributes(deploy_lib_dir.."/ddt."..so.."~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt.lua~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt_file~"))
assert.is_true(run.luarocks_bool("make ddt/double_deploy_type-0.2.0-1.rockspec --keep"))
assert.is.truthy(lfs.attributes(deploy_lib_dir.."/ddt."..so))
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt.lua"))
assert.same("ddt2", loadfile(deploy_lua_dir.."/ddt.lua")())
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt_file"))
assert.is.falsy(lfs.attributes(deploy_lib_dir.."/ddt."..so.."~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt.lua~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt_file~"))
assert.is.truthy(lfs.attributes(deploy_lib_dir.."/double_deploy_type_0_1_0_1-ddt."..so))
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/double_deploy_type_0_1_0_1-ddt.lua"))
assert.same("ddt1", loadfile(deploy_lua_dir.."/double_deploy_type_0_1_0_1-ddt.lua")())
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/double_deploy_type_0_1_0_1-ddt_file"))
end)
it("modules with same name from lua/ and lib/ when downgrading", function()
assert.is_true(run.luarocks_bool("make ddt/double_deploy_type-0.2.0-1.rockspec"))
assert.is.truthy(lfs.attributes(deploy_lib_dir.."/ddt."..so))
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt.lua"))
assert.same("ddt2", loadfile(deploy_lua_dir.."/ddt.lua")())
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt_file"))
assert.is.falsy(lfs.attributes(deploy_lib_dir.."/ddt."..so.."~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt.lua~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt_file~"))
assert.is_true(run.luarocks_bool("make ddt/double_deploy_type-0.1.0-1.rockspec"))
assert.is.truthy(lfs.attributes(deploy_lib_dir.."/ddt."..so))
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt.lua"))
assert.same("ddt1", loadfile(deploy_lua_dir.."/ddt.lua")())
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt_file"))
assert.is.falsy(lfs.attributes(deploy_lib_dir.."/ddt."..so.."~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt.lua~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt_file~"))
end)
it("modules with same name from lua/ and lib/ when downgrading with --keep", function()
assert.is_true(run.luarocks_bool("make ddt/double_deploy_type-0.2.0-1.rockspec"))
assert.is.truthy(lfs.attributes(deploy_lib_dir.."/ddt."..so))
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt.lua"))
assert.same("ddt2", loadfile(deploy_lua_dir.."/ddt.lua")())
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt_file"))
assert.is.falsy(lfs.attributes(deploy_lib_dir.."/ddt."..so.."~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt.lua~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt_file~"))
assert.is_true(run.luarocks_bool("make ddt/double_deploy_type-0.1.0-1.rockspec --keep"))
assert.is.truthy(lfs.attributes(deploy_lib_dir.."/ddt."..so))
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt.lua"))
assert.same("ddt2", loadfile(deploy_lua_dir.."/ddt.lua")())
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/ddt_file"))
assert.is.falsy(lfs.attributes(deploy_lib_dir.."/ddt."..so.."~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt.lua~"))
assert.is.falsy(lfs.attributes(deploy_lua_dir.."/ddt_file~"))
assert.is.truthy(lfs.attributes(deploy_lib_dir.."/double_deploy_type_0_1_0_1-ddt."..so))
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/double_deploy_type_0_1_0_1-ddt.lua"))
assert.same("ddt1", loadfile(deploy_lua_dir.."/double_deploy_type_0_1_0_1-ddt.lua")())
assert.is.truthy(lfs.attributes(deploy_lua_dir.."/double_deploy_type_0_1_0_1-ddt_file"))
end)
end)
describe("upgrading rockspecs with mixed deploy types", function()
before_each(function()
test_env.copy_dir(testing_paths.fixtures_dir .. "/mixed_deploy_type", "mdt")
end)
after_each(function()
test_env.remove_dir("mdt")
os.remove("mdt."..test_env.lib_extension)
end)
it("modules with same name from lua/ and lib/ when upgrading", function()
assert.is_true(run.luarocks_bool("make mdt/mixed_deploy_type-0.1.0-1.rockspec"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mdt.lua"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mdt_file"))
assert.is_true(run.luarocks_bool("make mdt/mixed_deploy_type-0.2.0-1.rockspec"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mdt."..test_env.lib_extension))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mdt_file"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mdt.lua"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mdt_file"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mixed_deploy_type_0_1_0_1-mdt.lua"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mixed_deploy_type_0_1_0_1-mdt_file"))
end)
it("modules with same name from lua/ and lib/ when upgrading with --keep", function()
assert.is_true(run.luarocks_bool("make mdt/mixed_deploy_type-0.1.0-1.rockspec"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mdt.lua"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mdt_file"))
assert.is_true(run.luarocks_bool("make mdt/mixed_deploy_type-0.2.0-1.rockspec --keep"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mdt."..test_env.lib_extension))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mdt_file"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mdt.lua"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mdt_file"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mixed_deploy_type_0_1_0_1-mdt.lua"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mixed_deploy_type_0_1_0_1-mdt_file"))
end)
it("modules with same name from lua/ and lib/ when downgrading", function()
assert.is_true(run.luarocks_bool("make mdt/mixed_deploy_type-0.2.0-1.rockspec"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mdt."..test_env.lib_extension))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mdt_file"))
assert.is_true(run.luarocks_bool("make mdt/mixed_deploy_type-0.1.0-1.rockspec"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mdt."..test_env.lib_extension))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mdt_file"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mixed_deploy_type_0_1_0_1-mdt."..test_env.lib_extension))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mixed_deploy_type_0_1_0_1-mdt_file"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mdt.lua"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mdt_file"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mixed_deploy_type_0_1_0_1-mdt.lua"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mixed_deploy_type_0_1_0_1-mdt_file"))
end)
it("modules with same name from lua/ and lib/ when downgrading with --keep", function()
assert.is_true(run.luarocks_bool("make mdt/mixed_deploy_type-0.2.0-1.rockspec"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mdt."..test_env.lib_extension))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mdt_file"))
assert.is_true(run.luarocks_bool("make mdt/mixed_deploy_type-0.1.0-1.rockspec --keep"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mdt."..test_env.lib_extension))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/mdt_file"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mdt.lua"))
assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mdt_file"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mixed_deploy_type_0_1_0_1-mdt.lua"))
assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/mixed_deploy_type_0_1_0_1-mdt_file"))
end)
end)
end)
|