diff options
Diffstat (limited to 'spec/path_spec.lua')
-rw-r--r-- | spec/path_spec.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/path_spec.lua b/spec/path_spec.lua index 7736741c..9b2a2854 100644 --- a/spec/path_spec.lua +++ b/spec/path_spec.lua | |||
@@ -16,7 +16,7 @@ describe("luarocks path #integration", function() | |||
16 | 16 | ||
17 | if _VERSION:match("[23]") then | 17 | if _VERSION:match("[23]") then |
18 | local v = _VERSION:gsub("Lua (%d+)%.(%d+)", "%1_%2") | 18 | local v = _VERSION:gsub("Lua (%d+)%.(%d+)", "%1_%2") |
19 | 19 | ||
20 | it("with LUA_PATH_"..v, function() | 20 | it("with LUA_PATH_"..v, function() |
21 | local output = run.luarocks("path", { | 21 | local output = run.luarocks("path", { |
22 | ["LUA_PATH_"..v] = package.path, | 22 | ["LUA_PATH_"..v] = package.path, |
@@ -49,23 +49,23 @@ describe("luarocks path #integration", function() | |||
49 | it("--lr-path", function() | 49 | it("--lr-path", function() |
50 | assert.is_true(run.luarocks_bool("path --lr-path")) | 50 | assert.is_true(run.luarocks_bool("path --lr-path")) |
51 | end) | 51 | end) |
52 | 52 | ||
53 | it("--lr-cpath", function() | 53 | it("--lr-cpath", function() |
54 | assert.is_true(run.luarocks_bool("path --lr-cpath")) | 54 | assert.is_true(run.luarocks_bool("path --lr-cpath")) |
55 | end) | 55 | end) |
56 | 56 | ||
57 | it("--tree", function() | 57 | it("--tree", function() |
58 | assert.is_true(run.luarocks_bool("path --tree=lua_modules")) | 58 | assert.is_true(run.luarocks_bool("path --tree=lua_modules")) |
59 | end) | 59 | end) |
60 | 60 | ||
61 | it("--project-tree", function() | 61 | it("--project-tree", function() |
62 | local path1 = "/share/lua/5%." .. test_env.lua_version:sub(3, 3) .. "/%?%.lua" | 62 | local path1 = "/share/lua/5%." .. test_env.lua_version:sub(3, 3) .. "/%?%.lua" |
63 | local path2 = "/share/lua/5%." .. test_env.lua_version:sub(3, 3) .. "/%?/init%.lua" | 63 | local path2 = "/share/lua/5%." .. test_env.lua_version:sub(3, 3) .. "/%?/init%.lua" |
64 | 64 | ||
65 | local path = run.luarocks("path --project-tree=foo") | 65 | local path = run.luarocks("path --project-tree=foo") |
66 | assert.truthy(path:find("foo" .. path1)) | 66 | assert.truthy(path:find("foo" .. path1)) |
67 | assert.truthy(path:find("foo" .. path2)) | 67 | assert.truthy(path:find("foo" .. path2)) |
68 | 68 | ||
69 | path = run.luarocks("path --project-tree=foo --tree=bar") | 69 | path = run.luarocks("path --project-tree=foo --tree=bar") |
70 | assert.falsy(path:find("foo" .. path1)) | 70 | assert.falsy(path:find("foo" .. path1)) |
71 | assert.falsy(path:find("foo" .. path2)) | 71 | assert.falsy(path:find("foo" .. path2)) |