aboutsummaryrefslogtreecommitdiff
path: root/spec/path_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/path_spec.lua')
-rw-r--r--spec/path_spec.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/path_spec.lua b/spec/path_spec.lua
index 0b115d5c..3a7dcea2 100644
--- a/spec/path_spec.lua
+++ b/spec/path_spec.lua
@@ -57,4 +57,19 @@ describe("LuaRocks path tests #integration", function()
57 it("LuaRocks path with tree", function() 57 it("LuaRocks path with 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
61 it("LuaRocks path with project-tree", function()
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"
64
65 local path = run.luarocks("path --project-tree=foo")
66 assert.truthy(path:find("foo" .. path1))
67 assert.truthy(path:find("foo" .. path2))
68
69 path = run.luarocks("path --project-tree=foo --tree=bar")
70 assert.falsy(path:find("foo" .. path1))
71 assert.falsy(path:find("foo" .. path2))
72 assert.truthy(path:find("bar" .. path1))
73 assert.truthy(path:find("bar" .. path2))
74 end)
60end) 75end)