From 50b5755d3e9a2c6b2040d2d167accd02208ec687 Mon Sep 17 00:00:00 2001 From: Hisham Date: Thu, 20 Oct 2016 22:16:01 -0400 Subject: Add test for #632. --- spec/install_spec.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'spec') 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() assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec")) end) + it('LuaRocks install - handle relative path in --tree #632', function() + local relative_path = "./temp_dir_"..math.random(100000) + if test_env.TEST_TARGET_OS == "windows" then + relative_path = relative_path:gsub("/", "\\") + end + test_env.remove_dir(relative_path) + assert.is.falsy(lfs.attributes(relative_path)) + assert.is_true(run.luarocks_bool("install luafilesystem --tree="..relative_path)) + assert.is.truthy(lfs.attributes(relative_path)) + test_env.remove_dir(relative_path) + assert.is.falsy(lfs.attributes(relative_path)) + end) + it('LuaRocks install - handle versioned modules when installing another version with --keep #268', function() assert.is_true(run.luarocks_bool("install luafilesystem")) assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION.."/lfs."..test_env.lib_extension)) -- cgit v1.2.3-55-g6feb