summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-10-20 22:16:01 -0400
committerPeter Melnichenko <mpeterval@gmail.com>2016-10-28 15:33:01 +0300
commit50b5755d3e9a2c6b2040d2d167accd02208ec687 (patch)
tree26ea092131acf98949d3162f4753bad101cff339 /spec
parentafd9b2a4f2187b802f1febcff9b54073c6d8943d (diff)
downloadluarocks-50b5755d3e9a2c6b2040d2d167accd02208ec687.tar.gz
luarocks-50b5755d3e9a2c6b2040d2d167accd02208ec687.tar.bz2
luarocks-50b5755d3e9a2c6b2040d2d167accd02208ec687.zip
Add test for #632.
Diffstat (limited to 'spec')
-rw-r--r--spec/install_spec.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/install_spec.lua b/spec/install_spec.lua
index 8d43ca2a..74f8f493 100644
--- a/spec/install_spec.lua
+++ b/spec/install_spec.lua
@@ -88,6 +88,19 @@ describe("LuaRocks install tests #blackbox #b_install", function()
88 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec")) 88 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec"))
89 end) 89 end)
90 90
91 it('LuaRocks install - handle relative path in --tree #632', function()
92 local relative_path = "./temp_dir_"..math.random(100000)
93 if test_env.TEST_TARGET_OS == "windows" then
94 relative_path = relative_path:gsub("/", "\\")
95 end
96 test_env.remove_dir(relative_path)
97 assert.is.falsy(lfs.attributes(relative_path))
98 assert.is_true(run.luarocks_bool("install luafilesystem --tree="..relative_path))
99 assert.is.truthy(lfs.attributes(relative_path))
100 test_env.remove_dir(relative_path)
101 assert.is.falsy(lfs.attributes(relative_path))
102 end)
103
91 it('LuaRocks install - handle versioned modules when installing another version with --keep #268', function() 104 it('LuaRocks install - handle versioned modules when installing another version with --keep #268', function()
92 assert.is_true(run.luarocks_bool("install luafilesystem")) 105 assert.is_true(run.luarocks_bool("install luafilesystem"))
93 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/lfs."..test_env.lib_extension)) 106 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/lfs."..test_env.lib_extension))