aboutsummaryrefslogtreecommitdiff
path: root/spec/which_spec.lua
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-02-20 13:43:44 -0300
committerHisham Muhammad <hisham@gobolinux.org>2024-02-23 20:47:09 -0300
commit2c4ff5240bf298fec07749f5984de2f08b8736ec (patch)
treef0b4dfec401fa1a132fc5786467fb8683d17bdcb /spec/which_spec.lua
parent79bd1739d8ca004ddd0b2fa5e24da4a6f4b776fa (diff)
downloadluarocks-2c4ff5240bf298fec07749f5984de2f08b8736ec.tar.gz
luarocks-2c4ff5240bf298fec07749f5984de2f08b8736ec.tar.bz2
luarocks-2c4ff5240bf298fec07749f5984de2f08b8736ec.zip
fix: better normalization for paths and slashes
Fixes #1195.
Diffstat (limited to 'spec/which_spec.lua')
-rw-r--r--spec/which_spec.lua9
1 files changed, 2 insertions, 7 deletions
diff --git a/spec/which_spec.lua b/spec/which_spec.lua
index d6e07eb7..9ccb1040 100644
--- a/spec/which_spec.lua
+++ b/spec/which_spec.lua
@@ -1,10 +1,6 @@
1local test_env = require("spec.util.test_env") 1local test_env = require("spec.util.test_env")
2local lfs = require("lfs")
3local run = test_env.run 2local run = test_env.run
4local testing_paths = test_env.testing_paths 3local P = test_env.P
5local env_variables = test_env.env_variables
6local write_file = test_env.write_file
7local hardcoded
8 4
9test_env.unload_luarocks() 5test_env.unload_luarocks()
10 6
@@ -17,7 +13,6 @@ describe("luarocks which #integration", function()
17 setup(function() 13 setup(function()
18 test_env.setup_specs(extra_rocks) 14 test_env.setup_specs(extra_rocks)
19 test_env.unload_luarocks() -- need to be required here, because hardcoded is created after first loading of specs 15 test_env.unload_luarocks() -- need to be required here, because hardcoded is created after first loading of specs
20 hardcoded = require("luarocks.core.hardcoded")
21 end) 16 end)
22 17
23 it("fails on missing arguments", function() 18 it("fails on missing arguments", function()
@@ -28,7 +23,7 @@ describe("luarocks which #integration", function()
28 it("finds modules found in package.path", function() 23 it("finds modules found in package.path", function()
29 assert.is_true(run.luarocks_bool("install say 1.2")) 24 assert.is_true(run.luarocks_bool("install say 1.2"))
30 local output = run.luarocks("which say") 25 local output = run.luarocks("which say")
31 assert.match("say/init.lua", output, 1, true) 26 assert.match(P"say/init.lua", output, 1, true)
32 assert.match("provided by say 1.2-1", output, 1, true) 27 assert.match("provided by say 1.2-1", output, 1, true)
33 end) 28 end)
34 29