diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-20 13:43:44 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-23 20:47:09 -0300 |
commit | 2c4ff5240bf298fec07749f5984de2f08b8736ec (patch) | |
tree | f0b4dfec401fa1a132fc5786467fb8683d17bdcb /spec/path_spec.lua | |
parent | 79bd1739d8ca004ddd0b2fa5e24da4a6f4b776fa (diff) | |
download | luarocks-2c4ff5240bf298fec07749f5984de2f08b8736ec.tar.gz luarocks-2c4ff5240bf298fec07749f5984de2f08b8736ec.tar.bz2 luarocks-2c4ff5240bf298fec07749f5984de2f08b8736ec.zip |
fix: better normalization for paths and slashes
Fixes #1195.
Diffstat (limited to 'spec/path_spec.lua')
-rw-r--r-- | spec/path_spec.lua | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/spec/path_spec.lua b/spec/path_spec.lua index 9b2a2854..ba2ecdde 100644 --- a/spec/path_spec.lua +++ b/spec/path_spec.lua | |||
@@ -57,19 +57,4 @@ describe("luarocks path #integration", function() | |||
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 | |||
61 | it("--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) | ||
75 | end) | 60 | end) |