aboutsummaryrefslogtreecommitdiff
path: root/spec/list_spec.lua
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2022-04-11 19:16:10 -0300
committerHisham Muhammad <hisham@gobolinux.org>2022-04-12 13:19:12 -0300
commit238ba6b21cfcb1af56f1e70dd50de201fc3482a7 (patch)
treec948b6d3e12e3a518a69d0c844e016c590b31825 /spec/list_spec.lua
parentdf8a3cd3c957db337bfc3ab4d404c33066a24923 (diff)
downloadluarocks-238ba6b21cfcb1af56f1e70dd50de201fc3482a7.tar.gz
luarocks-238ba6b21cfcb1af56f1e70dd50de201fc3482a7.tar.bz2
luarocks-238ba6b21cfcb1af56f1e70dd50de201fc3482a7.zip
tests: avoid repeated hardcoded package version numbers all over
Diffstat (limited to 'spec/list_spec.lua')
-rw-r--r--spec/list_spec.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/list_spec.lua b/spec/list_spec.lua
index 875d72a4..54c63bea 100644
--- a/spec/list_spec.lua
+++ b/spec/list_spec.lua
@@ -1,4 +1,5 @@
1local test_env = require("spec.util.test_env") 1local test_env = require("spec.util.test_env")
2local V = test_env.V
2local run = test_env.run 3local run = test_env.run
3local testing_paths = test_env.testing_paths 4local testing_paths = test_env.testing_paths
4 5
@@ -22,13 +23,13 @@ describe("luarocks list #integration", function()
22 23
23 it("--porcelain", function() 24 it("--porcelain", function()
24 local output = run.luarocks("list --porcelain") 25 local output = run.luarocks("list --porcelain")
25 assert.is.truthy(output:find("luacov\t0.15.0-1\tinstalled\t" .. testing_paths.testing_sys_rocks, 1, true)) 26 assert.is.truthy(output:find(V"luacov\t${LUACOV}\tinstalled\t" .. testing_paths.testing_sys_rocks, 1, true))
26 end) 27 end)
27 28
28 it("shows version number", function() 29 it("shows version number", function()
29 local output = run.luarocks("list") 30 local output = run.luarocks("list")
30 assert.is.truthy(output:find("luacov")) 31 assert.is.truthy(output:find("luacov"))
31 assert.matches("0.15.0-1", output, 1, true) 32 assert.matches(V"${LUACOV}", output, 1, true)
32 end) 33 end)
33 34
34 it("LuaRocks install outdated and list it", function() 35 it("LuaRocks install outdated and list it", function()