diff options
Diffstat (limited to 'spec/make_spec.lua')
| -rw-r--r-- | spec/make_spec.lua | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/spec/make_spec.lua b/spec/make_spec.lua index 6cce0543..b0572630 100644 --- a/spec/make_spec.lua +++ b/spec/make_spec.lua | |||
| @@ -213,48 +213,6 @@ describe("luarocks make #integration", function() | |||
| 213 | end, finally) | 213 | end, finally) |
| 214 | end) | 214 | end) |
| 215 | 215 | ||
| 216 | it("overrides luarocks.lock with --pin #pinning", function() | ||
| 217 | test_env.run_in_tmp(function(tmpdir) | ||
| 218 | write_file("test-2.0-1.rockspec", [[ | ||
| 219 | package = "test" | ||
| 220 | version = "2.0-1" | ||
| 221 | source = { | ||
| 222 | url = "file://]] .. tmpdir:gsub("\\", "/") .. [[/test.lua" | ||
| 223 | } | ||
| 224 | dependencies = { | ||
| 225 | "a_rock >= 0.8" | ||
| 226 | } | ||
| 227 | build = { | ||
| 228 | type = "builtin", | ||
| 229 | modules = { | ||
| 230 | test = "test.lua" | ||
| 231 | } | ||
| 232 | } | ||
| 233 | ]]) | ||
| 234 | write_file("test.lua", "return {}") | ||
| 235 | write_file("luarocks.lock", [[ | ||
| 236 | return { | ||
| 237 | dependencies = { | ||
| 238 | ["a_rock"] = "1.0-1", | ||
| 239 | } | ||
| 240 | } | ||
| 241 | ]]) | ||
| 242 | |||
| 243 | print(run.luarocks("make --server=" .. testing_paths.fixtures_dir .. "/a_repo --tree=lua_modules --pin")) | ||
| 244 | assert.is.truthy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/test/2.0-1/test-2.0-1.rockspec")) | ||
| 245 | assert.is.truthy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/a_rock/2.0-1/a_rock-2.0-1.rockspec")) | ||
| 246 | local lockfilename = "./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/test/2.0-1/luarocks.lock" | ||
| 247 | assert.is.truthy(lfs.attributes(lockfilename)) | ||
| 248 | local lockdata = loadfile(lockfilename)() | ||
| 249 | assert.same({ | ||
| 250 | dependencies = { | ||
| 251 | ["a_rock"] = "2.0-1", | ||
| 252 | ["lua"] = test_env.lua_version .. "-1", | ||
| 253 | } | ||
| 254 | }, lockdata) | ||
| 255 | end, finally) | ||
| 256 | end) | ||
| 257 | |||
| 258 | describe("#ddt upgrading rockspecs with double deploy types", function() | 216 | describe("#ddt upgrading rockspecs with double deploy types", function() |
| 259 | local deploy_lib_dir = testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION | 217 | local deploy_lib_dir = testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION |
| 260 | local deploy_lua_dir = testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION | 218 | local deploy_lua_dir = testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION |
