aboutsummaryrefslogtreecommitdiff
path: root/spec/path_spec.lua
diff options
context:
space:
mode:
authorGeorge Roman <30772943+georgeroman@users.noreply.github.com>2018-06-05 17:10:02 +0300
committerHisham Muhammad <hisham@gobolinux.org>2018-06-05 11:10:02 -0300
commitdb066d68e0355b98106a6e1f5f2573047363f851 (patch)
treef6c1f80e5ab291bc8baf2ddf11ff0d57474bfbf4 /spec/path_spec.lua
parent5b2540eb0d759d538c1d3fcd802b7d6961b337a9 (diff)
downloadluarocks-db066d68e0355b98106a6e1f5f2573047363f851.tar.gz
luarocks-db066d68e0355b98106a6e1f5f2573047363f851.tar.bz2
luarocks-db066d68e0355b98106a6e1f5f2573047363f851.zip
Tests: luarocks init (#811)
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)