diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2016-10-28 16:30:17 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-28 16:30:17 -0200 |
commit | 650755f9b82b678ebb1f14242e5249c5f9e6c36f (patch) | |
tree | 23a10a8c4f8db94d59cbfe882caed051cb80cdbe /spec | |
parent | 825f903a29df24b912e77e48d8b59e43e3a72029 (diff) | |
parent | 51aa62b855241a12866d3d008e7019689c24d130 (diff) | |
download | luarocks-650755f9b82b678ebb1f14242e5249c5f9e6c36f.tar.gz luarocks-650755f9b82b678ebb1f14242e5249c5f9e6c36f.tar.bz2 luarocks-650755f9b82b678ebb1f14242e5249c5f9e6c36f.zip |
Merge pull request #637 from mpeterv/fix-win-abs-path
Fix absolute path detection on Windows
Diffstat (limited to 'spec')
-rw-r--r-- | spec/install_spec.lua | 13 |
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)) |