diff options
author | Hisham <hisham@gobolinux.org> | 2016-10-20 03:04:19 -0400 |
---|---|---|
committer | Hisham <hisham@gobolinux.org> | 2016-10-20 03:04:19 -0400 |
commit | 2ced4474d635c11e687ad5b4b5357737503c0b38 (patch) | |
tree | 70e32f174247a73d96fb574b0d65e094165954d2 /spec | |
parent | c5f11204bf774c845fd3b6205e736fcbeaf680c9 (diff) | |
parent | 02dc970620ea88d63093a3f848eac69bb9e3e460 (diff) | |
download | luarocks-2ced4474d635c11e687ad5b4b5357737503c0b38.tar.gz luarocks-2ced4474d635c11e687ad5b4b5357737503c0b38.tar.bz2 luarocks-2ced4474d635c11e687ad5b4b5357737503c0b38.zip |
Merge branch 'master' into luarocks-3
Diffstat (limited to 'spec')
-rw-r--r-- | spec/install_spec.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/install_spec.lua b/spec/install_spec.lua index 2bbf4221..a00396fa 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua | |||
@@ -21,6 +21,8 @@ local extra_rocks = { | |||
21 | "/wsapi-1.6-1.src.rock", | 21 | "/wsapi-1.6-1.src.rock", |
22 | "/luafilesystem-1.6.3-2.src.rock", | 22 | "/luafilesystem-1.6.3-2.src.rock", |
23 | "/luafilesystem-1.6.3-1.src.rock", | 23 | "/luafilesystem-1.6.3-1.src.rock", |
24 | "/luacheck-0.7.3-1.src.rock", | ||
25 | "/luacheck-0.8.0-1.src.rock", | ||
24 | } | 26 | } |
25 | 27 | ||
26 | describe("LuaRocks install tests #blackbox #b_install", function() | 28 | describe("LuaRocks install tests #blackbox #b_install", function() |
@@ -87,13 +89,35 @@ describe("LuaRocks install tests #blackbox #b_install", function() | |||
87 | it('LuaRocks install - handle versioned modules when installing another version with --keep #268', function() | 89 | it('LuaRocks install - handle versioned modules when installing another version with --keep #268', function() |
88 | assert.is_true(run.luarocks_bool("install luafilesystem")) | 90 | 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)) | 91 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/lfs."..test_env.lib_extension)) |
92 | |||
90 | assert.is_true(run.luarocks_bool("install luafilesystem 1.6.3-1 --keep")) | 93 | assert.is_true(run.luarocks_bool("install luafilesystem 1.6.3-1 --keep")) |
91 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/lfs."..test_env.lib_extension)) | 94 | 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_3_1-lfs."..test_env.lib_extension)) | 95 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/luafilesystem_1_6_3_1-lfs."..test_env.lib_extension)) |
96 | |||
93 | assert.is_true(run.luarocks_bool("install luafilesystem")) | 97 | 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)) | 98 | 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_3_1-lfs."..test_env.lib_extension)) | 99 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/luafilesystem_1_6_3_1-lfs."..test_env.lib_extension)) |
96 | end) | 100 | end) |
101 | |||
102 | it('LuaRocks install - handle versioned modules and commands from different files when upgrading #302', function() | ||
103 | io.open(testing_paths.testing_sys_tree .. "/bin/luacheck"..test_env.wrapper_extension, "w"):close() | ||
104 | assert.is_true(run.luarocks_bool("install luacheck 0.7.3 --deps-mode=none")) | ||
105 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/luacheck.lua")) | ||
106 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/bin/luacheck"..test_env.wrapper_extension)) | ||
107 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/bin/luacheck"..test_env.wrapper_extension .. "~")) | ||
108 | |||
109 | assert.is_true(run.luarocks_bool("install luacheck 0.8.0 --deps-mode=none")) | ||
110 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/luacheck/init.lua")) | ||
111 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/bin/luacheck"..test_env.wrapper_extension)) | ||
112 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/luacheck_0_7_3_1-luacheck.lua")) | ||
113 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/bin/luacheck_0_7_3_1-luacheck"..test_env.wrapper_extension)) | ||
114 | |||
115 | assert.is_true(run.luarocks_bool("install luacheck 0.7.3 --keep --deps-mode=none")) | ||
116 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/luacheck/init.lua")) | ||
117 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/bin/luacheck"..test_env.wrapper_extension)) | ||
118 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION.."/luacheck_0_7_3_1-luacheck.lua")) | ||
119 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/bin/luacheck_0_7_3_1-luacheck"..test_env.wrapper_extension)) | ||
120 | end) | ||
97 | 121 | ||
98 | it("LuaRocks install only-deps of luasocket packed rock", function() | 122 | it("LuaRocks install only-deps of luasocket packed rock", function() |
99 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket 3.0rc1-2")) | 123 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket 3.0rc1-2")) |