diff options
| author | Hisham <hisham@gobolinux.org> | 2016-10-18 17:59:19 -0400 |
|---|---|---|
| committer | Hisham <hisham@gobolinux.org> | 2016-10-18 17:59:19 -0400 |
| commit | 2f67a04c91c5088d78d5f18013dded4f89382ff3 (patch) | |
| tree | aeac6013eaea7569546cbe34d2efbbd32dd4ebb6 | |
| parent | bcd4344e557476e00e10796f6f82927904c23c88 (diff) | |
| download | luarocks-2f67a04c91c5088d78d5f18013dded4f89382ff3.tar.gz luarocks-2f67a04c91c5088d78d5f18013dded4f89382ff3.tar.bz2 luarocks-2f67a04c91c5088d78d5f18013dded4f89382ff3.zip | |
Test case for issue #268
| -rw-r--r-- | spec/install_spec.lua | 15 | ||||
| -rw-r--r-- | test/test_environment.lua | 1 |
2 files changed, 15 insertions, 1 deletions
diff --git a/spec/install_spec.lua b/spec/install_spec.lua index 8857e4bd..45b3e2f9 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua | |||
| @@ -18,7 +18,9 @@ local extra_rocks = { | |||
| 18 | "/lxsh-0.8.6-2.rockspec", | 18 | "/lxsh-0.8.6-2.rockspec", |
| 19 | "/say-1.2-1.src.rock", | 19 | "/say-1.2-1.src.rock", |
| 20 | "/say-1.0-1.src.rock", | 20 | "/say-1.0-1.src.rock", |
| 21 | "/wsapi-1.6-1.src.rock" | 21 | "/wsapi-1.6-1.src.rock", |
| 22 | "/luafilesystem-1.6.3-2.src.rock", | ||
| 23 | "/luafilesystem-1.6.1-1.src.rock", | ||
| 22 | } | 24 | } |
| 23 | 25 | ||
| 24 | describe("LuaRocks install tests #blackbox #b_install", function() | 26 | describe("LuaRocks install tests #blackbox #b_install", function() |
| @@ -81,6 +83,17 @@ describe("LuaRocks install tests #blackbox #b_install", function() | |||
| 81 | end | 83 | end |
| 82 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec")) | 84 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec")) |
| 83 | end) | 85 | end) |
| 86 | |||
| 87 | it('LuaRocks install - handle versioned modules when installing another version with --keep #268', function() | ||
| 88 | assert.is_true(run.luarocks_bool("install luafilesystem")) | ||
| 89 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/lfs."..test_env.lib_extension)) | ||
| 90 | assert.is_true(run.luarocks_bool("install luafilesystem 1.6.1 --keep")) | ||
| 91 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/lfs."..test_env.lib_extension)) | ||
| 92 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/luafilesystem_1_6_1_1-lfs."..test_env.lib_extension)) | ||
| 93 | assert.is_true(run.luarocks_bool("install luafilesystem")) | ||
| 94 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/lfs."..test_env.lib_extension)) | ||
| 95 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/luafilesystem_1_6_1_1-lfs."..test_env.lib_extension)) | ||
| 96 | end) | ||
| 84 | 97 | ||
| 85 | it("LuaRocks install only-deps of luasocket packed rock", function() | 98 | it("LuaRocks install only-deps of luasocket packed rock", function() |
| 86 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket 3.0rc1-2")) | 99 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket 3.0rc1-2")) |
diff --git a/test/test_environment.lua b/test/test_environment.lua index 87401a90..1d0b0c32 100644 --- a/test/test_environment.lua +++ b/test/test_environment.lua | |||
| @@ -514,6 +514,7 @@ function test_env.setup_specs(extra_rocks) | |||
| 514 | package.path = test_env.env_variables.LUA_PATH | 514 | package.path = test_env.env_variables.LUA_PATH |
| 515 | 515 | ||
| 516 | test_env.platform = execute_output(test_env.testing_paths.lua .. " -e \"print(require('luarocks.cfg').arch)\"", false, test_env.env_variables) | 516 | test_env.platform = execute_output(test_env.testing_paths.lua .. " -e \"print(require('luarocks.cfg').arch)\"", false, test_env.env_variables) |
| 517 | test_env.lib_extension = execute_output(test_env.testing_paths.lua .. " -e \"print(require('luarocks.cfg').lib_extension)\"", false, test_env.env_variables) | ||
| 517 | test_env.md5sums = create_md5sums(test_env.testing_paths) | 518 | test_env.md5sums = create_md5sums(test_env.testing_paths) |
| 518 | test_env.setup_done = true | 519 | test_env.setup_done = true |
| 519 | title("RUNNING TESTS") | 520 | title("RUNNING TESTS") |
