aboutsummaryrefslogtreecommitdiff
path: root/spec/add_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/add_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/add_spec.lua')
-rw-r--r--spec/add_spec.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/add_spec.lua b/spec/add_spec.lua
index ea6274ba..b17cadac 100644
--- a/spec/add_spec.lua
+++ b/spec/add_spec.lua
@@ -5,8 +5,8 @@ local testing_paths = test_env.testing_paths
5test_env.unload_luarocks() 5test_env.unload_luarocks()
6 6
7local extra_rocks = { 7local extra_rocks = {
8 "/luasocket-3.0rc1-2.src.rock", 8 "/luasocket-${LUASOCKET}.src.rock",
9 "/luasocket-3.0rc1-2.rockspec" 9 "/luasocket-${LUASOCKET}.rockspec"
10} 10}
11 11
12describe("LuaRocks add tests #integration", function() 12describe("LuaRocks add tests #integration", function()
@@ -25,20 +25,20 @@ describe("LuaRocks add tests #integration", function()
25 end) 25 end)
26 26
27 it("invalid server", function() 27 it("invalid server", function()
28 assert.is_false(run.luarocks_admin_bool("--server=invalid add " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.src.rock")) 28 assert.is_false(run.luarocks_admin_bool("--server=invalid add " .. testing_paths.testing_server .. "/luasocket-${LUASOCKET}.src.rock"))
29 end) 29 end)
30 30
31 it("invalid server #ssh", function() 31 it("invalid server #ssh", function()
32 assert.is_true(run.luarocks_admin_bool("--server=testing add " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.src.rock")) 32 assert.is_true(run.luarocks_admin_bool("--server=testing add " .. testing_paths.testing_server .. "/luasocket-${LUASOCKET}.src.rock"))
33 end) 33 end)
34 34
35 --TODO This test fails, sftp support not yet implemented 35 --TODO This test fails, sftp support not yet implemented
36 it("invalid server", function() 36 it("invalid server", function()
37 assert.is_false(run.luarocks_admin_bool("--server=testing add luasocket-3.0rc1-2.src.rock", { LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/testing_config_sftp.lua" } )) 37 assert.is_false(run.luarocks_admin_bool("--server=testing add luasocket-${LUASOCKET}.src.rock", { LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/testing_config_sftp.lua" } ))
38 end) 38 end)
39 39
40 it("split server url", function() 40 it("split server url", function()
41 assert.is_false(run.luarocks_admin_bool("--server=\"localhost@/tmp/luarocks_testing\" add " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.src.rock")) 41 assert.is_false(run.luarocks_admin_bool("--server=\"localhost@/tmp/luarocks_testing\" add " .. testing_paths.testing_server .. "/luasocket-${LUASOCKET}.src.rock"))
42 end) 42 end)
43 end) 43 end)
44end) 44end)