diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2022-04-16 18:53:07 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2022-04-16 21:17:34 -0300 |
commit | 0f82063a51cd9197edd214e0427fe4e84ae9c0b9 (patch) | |
tree | 90b1f09e2504e8eb97209af4ec24e7ab6fdfbb17 /spec | |
parent | a405d1a5f6c9eb7249a9271ca23ff1f701f91cfe (diff) | |
download | luarocks-0f82063a51cd9197edd214e0427fe4e84ae9c0b9.tar.gz luarocks-0f82063a51cd9197edd214e0427fe4e84ae9c0b9.tar.bz2 luarocks-0f82063a51cd9197edd214e0427fe4e84ae9c0b9.zip |
tests: run tests on Lua 5.4 and LuaJIT 2.1
Diffstat (limited to 'spec')
-rw-r--r-- | spec/build_spec.lua | 11 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest | 18 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.1 | 18 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.1.zip | bin | 358 -> 343 bytes | |||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.2 | 18 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.2.zip | bin | 358 -> 343 bytes | |||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.3 | 18 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.3.zip | bin | 358 -> 343 bytes | |||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.4 | 90 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.4.zip | bin | 0 -> 343 bytes | |||
-rw-r--r-- | spec/fixtures/a_repo/manifests/a_user/manifest-5.4 | 14 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifests/another_user/manifest-5.4 | 14 | ||||
-rw-r--r-- | spec/init_spec.lua | 4 | ||||
-rw-r--r-- | spec/install_spec.lua | 8 | ||||
-rw-r--r-- | spec/test_spec.lua | 2 | ||||
-rw-r--r-- | spec/unpack_spec.lua | 25 | ||||
-rw-r--r-- | spec/util/test_env.lua | 9 | ||||
-rw-r--r-- | spec/util/versions.lua | 4 |
18 files changed, 220 insertions, 33 deletions
diff --git a/spec/build_spec.lua b/spec/build_spec.lua index ba6c1a94..653f2160 100644 --- a/spec/build_spec.lua +++ b/spec/build_spec.lua | |||
@@ -22,7 +22,6 @@ local extra_rocks = { | |||
22 | "/luafilesystem-${LUAFILESYSTEM}.src.rock", | 22 | "/luafilesystem-${LUAFILESYSTEM}.src.rock", |
23 | "/luasocket-${LUASOCKET}.src.rock", | 23 | "/luasocket-${LUASOCKET}.src.rock", |
24 | "/luasocket-${LUASOCKET}.rockspec", | 24 | "/luasocket-${LUASOCKET}.rockspec", |
25 | "/stdlib-41.0.0-1.src.rock", | ||
26 | "spec/fixtures/a_rock-1.0-1.src.rock", | 25 | "spec/fixtures/a_rock-1.0-1.src.rock", |
27 | "/busted-2.0.0-1.rockspec", | 26 | "/busted-2.0.0-1.rockspec", |
28 | "/busted-2.0.rc13-0.rockspec", | 27 | "/busted-2.0.rc13-0.rockspec", |
@@ -141,11 +140,6 @@ describe("LuaRocks build #integration", function() | |||
141 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luacov/${LUACOV}/luacov-${LUACOV}.rockspec")) | 140 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luacov/${LUACOV}/luacov-${LUACOV}.rockspec")) |
142 | end) | 141 | end) |
143 | 142 | ||
144 | it("command stdlib", function() | ||
145 | assert.is_true(run.luarocks_bool("build stdlib")) | ||
146 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/stdlib/41.0.0-1/stdlib-41.0.0-1.rockspec")) | ||
147 | end) | ||
148 | |||
149 | it("fails if the current platform is not supported", function() | 143 | it("fails if the current platform is not supported", function() |
150 | test_env.run_in_tmp(function(tmpdir) | 144 | test_env.run_in_tmp(function(tmpdir) |
151 | write_file("test-1.0-1.rockspec", [[ | 145 | write_file("test-1.0-1.rockspec", [[ |
@@ -273,13 +267,14 @@ describe("LuaRocks build #integration", function() | |||
273 | end) | 267 | end) |
274 | 268 | ||
275 | it("lmathx deps partial match", function() | 269 | it("lmathx deps partial match", function() |
276 | assert.is_true(run.luarocks_bool("build lmathx")) | ||
277 | |||
278 | if test_env.LUA_V == "5.1" or test_env.LUAJIT_V then | 270 | if test_env.LUA_V == "5.1" or test_env.LUAJIT_V then |
271 | assert.is_true(run.luarocks_bool("build lmathx")) | ||
279 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20120430.51-1/lmathx-20120430.51-1.rockspec")) | 272 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20120430.51-1/lmathx-20120430.51-1.rockspec")) |
280 | elseif test_env.LUA_V == "5.2" then | 273 | elseif test_env.LUA_V == "5.2" then |
274 | assert.is_true(run.luarocks_bool("build lmathx")) | ||
281 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20120430.52-1/lmathx-20120430.52-1.rockspec")) | 275 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20120430.52-1/lmathx-20120430.52-1.rockspec")) |
282 | elseif test_env.LUA_V == "5.3" then | 276 | elseif test_env.LUA_V == "5.3" then |
277 | assert.is_true(run.luarocks_bool("build lmathx")) | ||
283 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20150505-1/lmathx-20150505-1.rockspec")) | 278 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20150505-1/lmathx-20150505-1.rockspec")) |
284 | end | 279 | end |
285 | end) | 280 | end) |
diff --git a/spec/fixtures/a_repo/manifest b/spec/fixtures/a_repo/manifest index 5ab87d25..a5f770a1 100644 --- a/spec/fixtures/a_repo/manifest +++ b/spec/fixtures/a_repo/manifest | |||
@@ -68,5 +68,23 @@ repository = { | |||
68 | arch = "src" | 68 | arch = "src" |
69 | } | 69 | } |
70 | } | 70 | } |
71 | }, | ||
72 | non_lua_file = { | ||
73 | ["1.0-1"] = { | ||
74 | { | ||
75 | arch = "rockspec" | ||
76 | }, | ||
77 | { | ||
78 | arch = "src" | ||
79 | } | ||
80 | }, | ||
81 | ["1.0-2"] = { | ||
82 | { | ||
83 | arch = "rockspec" | ||
84 | }, | ||
85 | { | ||
86 | arch = "src" | ||
87 | } | ||
88 | } | ||
71 | } | 89 | } |
72 | } | 90 | } |
diff --git a/spec/fixtures/a_repo/manifest-5.1 b/spec/fixtures/a_repo/manifest-5.1 index 5ab87d25..a5f770a1 100644 --- a/spec/fixtures/a_repo/manifest-5.1 +++ b/spec/fixtures/a_repo/manifest-5.1 | |||
@@ -68,5 +68,23 @@ repository = { | |||
68 | arch = "src" | 68 | arch = "src" |
69 | } | 69 | } |
70 | } | 70 | } |
71 | }, | ||
72 | non_lua_file = { | ||
73 | ["1.0-1"] = { | ||
74 | { | ||
75 | arch = "rockspec" | ||
76 | }, | ||
77 | { | ||
78 | arch = "src" | ||
79 | } | ||
80 | }, | ||
81 | ["1.0-2"] = { | ||
82 | { | ||
83 | arch = "rockspec" | ||
84 | }, | ||
85 | { | ||
86 | arch = "src" | ||
87 | } | ||
88 | } | ||
71 | } | 89 | } |
72 | } | 90 | } |
diff --git a/spec/fixtures/a_repo/manifest-5.1.zip b/spec/fixtures/a_repo/manifest-5.1.zip index 65e316df..e63d6f1f 100644 --- a/spec/fixtures/a_repo/manifest-5.1.zip +++ b/spec/fixtures/a_repo/manifest-5.1.zip | |||
Binary files differ | |||
diff --git a/spec/fixtures/a_repo/manifest-5.2 b/spec/fixtures/a_repo/manifest-5.2 index 5ab87d25..a5f770a1 100644 --- a/spec/fixtures/a_repo/manifest-5.2 +++ b/spec/fixtures/a_repo/manifest-5.2 | |||
@@ -68,5 +68,23 @@ repository = { | |||
68 | arch = "src" | 68 | arch = "src" |
69 | } | 69 | } |
70 | } | 70 | } |
71 | }, | ||
72 | non_lua_file = { | ||
73 | ["1.0-1"] = { | ||
74 | { | ||
75 | arch = "rockspec" | ||
76 | }, | ||
77 | { | ||
78 | arch = "src" | ||
79 | } | ||
80 | }, | ||
81 | ["1.0-2"] = { | ||
82 | { | ||
83 | arch = "rockspec" | ||
84 | }, | ||
85 | { | ||
86 | arch = "src" | ||
87 | } | ||
88 | } | ||
71 | } | 89 | } |
72 | } | 90 | } |
diff --git a/spec/fixtures/a_repo/manifest-5.2.zip b/spec/fixtures/a_repo/manifest-5.2.zip index b4334a65..cec28c07 100644 --- a/spec/fixtures/a_repo/manifest-5.2.zip +++ b/spec/fixtures/a_repo/manifest-5.2.zip | |||
Binary files differ | |||
diff --git a/spec/fixtures/a_repo/manifest-5.3 b/spec/fixtures/a_repo/manifest-5.3 index 5ab87d25..a5f770a1 100644 --- a/spec/fixtures/a_repo/manifest-5.3 +++ b/spec/fixtures/a_repo/manifest-5.3 | |||
@@ -68,5 +68,23 @@ repository = { | |||
68 | arch = "src" | 68 | arch = "src" |
69 | } | 69 | } |
70 | } | 70 | } |
71 | }, | ||
72 | non_lua_file = { | ||
73 | ["1.0-1"] = { | ||
74 | { | ||
75 | arch = "rockspec" | ||
76 | }, | ||
77 | { | ||
78 | arch = "src" | ||
79 | } | ||
80 | }, | ||
81 | ["1.0-2"] = { | ||
82 | { | ||
83 | arch = "rockspec" | ||
84 | }, | ||
85 | { | ||
86 | arch = "src" | ||
87 | } | ||
88 | } | ||
71 | } | 89 | } |
72 | } | 90 | } |
diff --git a/spec/fixtures/a_repo/manifest-5.3.zip b/spec/fixtures/a_repo/manifest-5.3.zip index bab15712..23df5c30 100644 --- a/spec/fixtures/a_repo/manifest-5.3.zip +++ b/spec/fixtures/a_repo/manifest-5.3.zip | |||
Binary files differ | |||
diff --git a/spec/fixtures/a_repo/manifest-5.4 b/spec/fixtures/a_repo/manifest-5.4 new file mode 100644 index 00000000..a5f770a1 --- /dev/null +++ b/spec/fixtures/a_repo/manifest-5.4 | |||
@@ -0,0 +1,90 @@ | |||
1 | commands = {} | ||
2 | modules = {} | ||
3 | repository = { | ||
4 | a_build_dep = { | ||
5 | ["1.0-1"] = { | ||
6 | { | ||
7 | arch = "src" | ||
8 | }, | ||
9 | { | ||
10 | arch = "rockspec" | ||
11 | } | ||
12 | } | ||
13 | }, | ||
14 | a_rock = { | ||
15 | ["1.0-1"] = { | ||
16 | { | ||
17 | arch = "src" | ||
18 | }, | ||
19 | { | ||
20 | arch = "rockspec" | ||
21 | } | ||
22 | }, | ||
23 | ["2.0-1"] = { | ||
24 | { | ||
25 | arch = "src" | ||
26 | } | ||
27 | } | ||
28 | }, | ||
29 | busted_project = { | ||
30 | ["0.1-1"] = { | ||
31 | { | ||
32 | arch = "src" | ||
33 | }, | ||
34 | { | ||
35 | arch = "rockspec" | ||
36 | } | ||
37 | } | ||
38 | }, | ||
39 | has_another_namespaced_dep = { | ||
40 | ["1.0-1"] = { | ||
41 | { | ||
42 | arch = "rockspec" | ||
43 | }, | ||
44 | { | ||
45 | arch = "src" | ||
46 | } | ||
47 | } | ||
48 | }, | ||
49 | has_build_dep = { | ||
50 | ["1.0-1"] = { | ||
51 | { | ||
52 | arch = "rockspec" | ||
53 | }, | ||
54 | { | ||
55 | arch = "src" | ||
56 | }, | ||
57 | { | ||
58 | arch = "all" | ||
59 | } | ||
60 | } | ||
61 | }, | ||
62 | has_namespaced_dep = { | ||
63 | ["1.0-1"] = { | ||
64 | { | ||
65 | arch = "rockspec" | ||
66 | }, | ||
67 | { | ||
68 | arch = "src" | ||
69 | } | ||
70 | } | ||
71 | }, | ||
72 | non_lua_file = { | ||
73 | ["1.0-1"] = { | ||
74 | { | ||
75 | arch = "rockspec" | ||
76 | }, | ||
77 | { | ||
78 | arch = "src" | ||
79 | } | ||
80 | }, | ||
81 | ["1.0-2"] = { | ||
82 | { | ||
83 | arch = "rockspec" | ||
84 | }, | ||
85 | { | ||
86 | arch = "src" | ||
87 | } | ||
88 | } | ||
89 | } | ||
90 | } | ||
diff --git a/spec/fixtures/a_repo/manifest-5.4.zip b/spec/fixtures/a_repo/manifest-5.4.zip new file mode 100644 index 00000000..14b5621e --- /dev/null +++ b/spec/fixtures/a_repo/manifest-5.4.zip | |||
Binary files differ | |||
diff --git a/spec/fixtures/a_repo/manifests/a_user/manifest-5.4 b/spec/fixtures/a_repo/manifests/a_user/manifest-5.4 new file mode 100644 index 00000000..74b0c618 --- /dev/null +++ b/spec/fixtures/a_repo/manifests/a_user/manifest-5.4 | |||
@@ -0,0 +1,14 @@ | |||
1 | commands = {} | ||
2 | modules = {} | ||
3 | repository = { | ||
4 | a_rock = { | ||
5 | ["2.0-1"] = { | ||
6 | { | ||
7 | arch = "rockspec" | ||
8 | }, | ||
9 | { | ||
10 | arch = "src" | ||
11 | } | ||
12 | } | ||
13 | } | ||
14 | } | ||
diff --git a/spec/fixtures/a_repo/manifests/another_user/manifest-5.4 b/spec/fixtures/a_repo/manifests/another_user/manifest-5.4 new file mode 100644 index 00000000..185aed08 --- /dev/null +++ b/spec/fixtures/a_repo/manifests/another_user/manifest-5.4 | |||
@@ -0,0 +1,14 @@ | |||
1 | commands = {} | ||
2 | modules = {} | ||
3 | repository = { | ||
4 | a_rock = { | ||
5 | ["3.0-1"] = { | ||
6 | { | ||
7 | arch = "src" | ||
8 | }, | ||
9 | { | ||
10 | arch = "rockspec" | ||
11 | } | ||
12 | } | ||
13 | } | ||
14 | } | ||
diff --git a/spec/init_spec.lua b/spec/init_spec.lua index 3bde313a..dadeb300 100644 --- a/spec/init_spec.lua +++ b/spec/init_spec.lua | |||
@@ -92,13 +92,13 @@ describe("luarocks init #integration", function() | |||
92 | lfs.mkdir(myproject) | 92 | lfs.mkdir(myproject) |
93 | lfs.chdir(myproject) | 93 | lfs.chdir(myproject) |
94 | 94 | ||
95 | assert(run.luarocks("init --lua-versions=5.1,5.2,5.3")) | 95 | assert(run.luarocks("init --lua-versions=5.1,5.2,5.3,5.4")) |
96 | local rockspec_name = myproject .. "/myproject-dev-1.rockspec" | 96 | local rockspec_name = myproject .. "/myproject-dev-1.rockspec" |
97 | assert.truthy(lfs.attributes(rockspec_name)) | 97 | assert.truthy(lfs.attributes(rockspec_name)) |
98 | local fd = assert(io.open(rockspec_name, "rb")) | 98 | local fd = assert(io.open(rockspec_name, "rb")) |
99 | local data = fd:read("*a") | 99 | local data = fd:read("*a") |
100 | fd:close() | 100 | fd:close() |
101 | assert.truthy(data:find("lua >= 5.1, < 5.4", 1, true)) | 101 | assert.truthy(data:find("lua >= 5.1, < 5.5", 1, true)) |
102 | end, finally) | 102 | end, finally) |
103 | end) | 103 | end) |
104 | 104 | ||
diff --git a/spec/install_spec.lua b/spec/install_spec.lua index 1154e9b9..c3aa0064 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua | |||
@@ -10,8 +10,8 @@ local V = test_env.V | |||
10 | test_env.unload_luarocks() | 10 | test_env.unload_luarocks() |
11 | 11 | ||
12 | local extra_rocks = { | 12 | local extra_rocks = { |
13 | "/cprint-0.1-2.src.rock", | 13 | "/cprint-${CPRINT}.src.rock", |
14 | "/cprint-0.1-2.rockspec", | 14 | "/cprint-${CPRINT}.rockspec", |
15 | "/lpeg-${LPEG}.src.rock", | 15 | "/lpeg-${LPEG}.src.rock", |
16 | "/luassert-1.7.0-1.src.rock", | 16 | "/luassert-1.7.0-1.src.rock", |
17 | "/luasocket-${LUASOCKET}.src.rock", | 17 | "/luasocket-${LUASOCKET}.src.rock", |
@@ -248,8 +248,8 @@ describe("luarocks install #integration", function() | |||
248 | 248 | ||
249 | it("binary rock of cprint", function() | 249 | it("binary rock of cprint", function() |
250 | assert.is_true(run.luarocks_bool("build --pack-binary-rock cprint")) | 250 | assert.is_true(run.luarocks_bool("build --pack-binary-rock cprint")) |
251 | assert.is_true(run.luarocks_bool("install cprint-0.1-2." .. test_env.platform .. ".rock")) | 251 | assert.is_true(run.luarocks_bool("install cprint-${CPRINT}." .. test_env.platform .. ".rock")) |
252 | assert.is_true(os.remove("cprint-0.1-2." .. test_env.platform .. ".rock")) | 252 | assert.is_true(os.remove("cprint-${CPRINT}." .. test_env.platform .. ".rock")) |
253 | end) | 253 | end) |
254 | 254 | ||
255 | it("accepts --no-manifest flag", function() | 255 | it("accepts --no-manifest flag", function() |
diff --git a/spec/test_spec.lua b/spec/test_spec.lua index 21844d63..33643097 100644 --- a/spec/test_spec.lua +++ b/spec/test_spec.lua | |||
@@ -12,7 +12,7 @@ local extra_rocks = { | |||
12 | "/lua_cliargs-3.0-1.src.rock", | 12 | "/lua_cliargs-3.0-1.src.rock", |
13 | "/luafilesystem-${LUAFILESYSTEM}.src.rock", | 13 | "/luafilesystem-${LUAFILESYSTEM}.src.rock", |
14 | "/luasystem-0.2.1-0.src.rock", | 14 | "/luasystem-0.2.1-0.src.rock", |
15 | "/dkjson-2.5-2.src.rock", | 15 | "/dkjson-${DKJSON}.src.rock", |
16 | "/say-1.3-1.rockspec", | 16 | "/say-1.3-1.rockspec", |
17 | "/luassert-1.8.0-0.rockspec", | 17 | "/luassert-1.8.0-0.rockspec", |
18 | "/lua-term-0.7-1.rockspec", | 18 | "/lua-term-0.7-1.rockspec", |
diff --git a/spec/unpack_spec.lua b/spec/unpack_spec.lua index 9b1e2b9a..00d6781f 100644 --- a/spec/unpack_spec.lua +++ b/spec/unpack_spec.lua | |||
@@ -1,12 +1,13 @@ | |||
1 | local test_env = require("spec.util.test_env") | 1 | local test_env = require("spec.util.test_env") |
2 | local lfs = require("lfs") | ||
2 | local run = test_env.run | 3 | local run = test_env.run |
3 | local testing_paths = test_env.testing_paths | 4 | local testing_paths = test_env.testing_paths |
4 | 5 | ||
5 | test_env.unload_luarocks() | 6 | test_env.unload_luarocks() |
6 | 7 | ||
7 | local extra_rocks = { | 8 | local extra_rocks = { |
8 | "/cprint-0.1-2.src.rock", | 9 | "/cprint-${CPRINT}.src.rock", |
9 | "/cprint-0.1-2.rockspec", | 10 | "/cprint-${CPRINT}.rockspec", |
10 | "/luazip-1.2.4-1.rockspec" | 11 | "/luazip-1.2.4-1.rockspec" |
11 | } | 12 | } |
12 | 13 | ||
@@ -33,22 +34,22 @@ describe("luarocks unpack #integration", function() | |||
33 | describe("more complex tests", function() | 34 | describe("more complex tests", function() |
34 | it("download", function() | 35 | it("download", function() |
35 | assert.is_true(run.luarocks_bool("unpack cprint")) | 36 | assert.is_true(run.luarocks_bool("unpack cprint")) |
36 | test_env.remove_dir("cprint-0.1-2") | 37 | test_env.remove_dir("cprint-${CPRINT}") |
37 | end) | 38 | end) |
38 | 39 | ||
39 | it("src", function() | 40 | it("src", function() |
40 | assert.is_true(run.luarocks_bool("download --source cprint")) | 41 | assert.is_true(run.luarocks_bool("download --source cprint")) |
41 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2.src.rock")) | 42 | assert.is_true(run.luarocks_bool("unpack cprint-${CPRINT}.src.rock")) |
42 | os.remove("cprint-0.1-2.src.rock") | 43 | os.remove("cprint-${CPRINT}.src.rock") |
43 | test_env.remove_dir("cprint-0.1-2") | 44 | test_env.remove_dir("cprint-${CPRINT}") |
44 | end) | 45 | end) |
45 | 46 | ||
46 | it("src", function() | 47 | it("src", function() |
47 | assert.is_true(run.luarocks_bool("download --rockspec cprint")) | 48 | assert.is_true(run.luarocks_bool("download --rockspec cprint")) |
48 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2.rockspec")) | 49 | assert.is_true(run.luarocks_bool("unpack cprint-${CPRINT}.rockspec")) |
49 | os.remove("cprint-0.1-2.rockspec") | 50 | os.remove("cprint-${CPRINT}.rockspec") |
50 | os.remove("lua-cprint") | 51 | os.remove("lua-cprint") |
51 | test_env.remove_dir("cprint-0.1-2") | 52 | test_env.remove_dir("cprint-${CPRINT}") |
52 | end) | 53 | end) |
53 | 54 | ||
54 | -- #595 luarocks unpack of a git:// rockspec fails to copy the rockspec | 55 | -- #595 luarocks unpack of a git:// rockspec fails to copy the rockspec |
@@ -62,9 +63,9 @@ describe("luarocks unpack #integration", function() | |||
62 | it("binary", function() | 63 | it("binary", function() |
63 | assert.is_true(run.luarocks_bool("build cprint")) | 64 | assert.is_true(run.luarocks_bool("build cprint")) |
64 | assert.is_true(run.luarocks_bool("pack cprint")) | 65 | assert.is_true(run.luarocks_bool("pack cprint")) |
65 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2." .. test_env.platform .. ".rock")) | 66 | assert.is_true(run.luarocks_bool("unpack cprint-${CPRINT}." .. test_env.platform .. ".rock")) |
66 | test_env.remove_dir("cprint-0.1-2") | 67 | test_env.remove_dir("cprint-${CPRINT}") |
67 | os.remove("cprint-0.1-2." .. test_env.platform .. ".rock") | 68 | os.remove("cprint-${CPRINT}." .. test_env.platform .. ".rock") |
68 | end) | 69 | end) |
69 | end) | 70 | end) |
70 | end) | 71 | end) |
diff --git a/spec/util/test_env.lua b/spec/util/test_env.lua index 6a466bae..c32e9978 100644 --- a/spec/util/test_env.lua +++ b/spec/util/test_env.lua | |||
@@ -446,7 +446,7 @@ local function download_rocks(urls, save_path) | |||
446 | else | 446 | else |
447 | -- check if already downloaded | 447 | -- check if already downloaded |
448 | if not test_env.exists(save_path .. "/" .. url) then | 448 | if not test_env.exists(save_path .. "/" .. url) then |
449 | table.insert(to_download, luarocks_repo .. url) | 449 | table.insert(to_download, ((luarocks_repo .. url):gsub("org//", "org/"))) |
450 | end | 450 | end |
451 | end | 451 | end |
452 | end | 452 | end |
@@ -972,7 +972,7 @@ local function prepare_mock_server_binary_rocks() | |||
972 | "wsapi-1.6.1-1.src.rock", | 972 | "wsapi-1.6.1-1.src.rock", |
973 | "rings-1.3.0-1.src.rock", | 973 | "rings-1.3.0-1.src.rock", |
974 | "wsapi-xavante-1.6.1-1.src.rock", | 974 | "wsapi-xavante-1.6.1-1.src.rock", |
975 | "dkjson-2.5-2.src.rock", | 975 | "dkjson-${DKJSON}.src.rock", |
976 | "restserver-0.1-1.src.rock", | 976 | "restserver-0.1-1.src.rock", |
977 | "restserver-xavante-0.2-1.src.rock", | 977 | "restserver-xavante-0.2-1.src.rock", |
978 | } | 978 | } |
@@ -1019,9 +1019,8 @@ function test_env.main() | |||
1019 | table.insert(urls, "/luasocket-${LUASOCKET}.src.rock") | 1019 | table.insert(urls, "/luasocket-${LUASOCKET}.src.rock") |
1020 | table.insert(urls, "/luasocket-${LUASOCKET}.rockspec") | 1020 | table.insert(urls, "/luasocket-${LUASOCKET}.rockspec") |
1021 | table.insert(urls, "/md5-1.2-1.src.rock") | 1021 | table.insert(urls, "/md5-1.2-1.src.rock") |
1022 | --table.insert(urls, "/lzlib-0.4.1.53-1.src.rock") | 1022 | table.insert(urls, "/manifests/hisham/lua-zlib-1.2-0.src.rock") |
1023 | table.insert(urls, "/lua-zlib-1.2-0.src.rock") | 1023 | table.insert(urls, "/manifests/hisham/lua-bz2-0.2.1.1-1.src.rock") |
1024 | table.insert(urls, "/lua-bz2-0.1.0-1.src.rock") | ||
1025 | rocks = {"luafilesystem", "luasocket", "md5", "lua-zlib", "lua-bz2"} | 1024 | rocks = {"luafilesystem", "luasocket", "md5", "lua-zlib", "lua-bz2"} |
1026 | if test_env.TEST_TARGET_OS ~= "windows" then | 1025 | if test_env.TEST_TARGET_OS ~= "windows" then |
1027 | if test_env.lua_version == "5.1" then | 1026 | if test_env.lua_version == "5.1" then |
diff --git a/spec/util/versions.lua b/spec/util/versions.lua index b0d5c453..0d3b8796 100644 --- a/spec/util/versions.lua +++ b/spec/util/versions.lua | |||
@@ -2,7 +2,9 @@ return { | |||
2 | binaryheap = "0.4-1", -- dependency for copas | 2 | binaryheap = "0.4-1", -- dependency for copas |
3 | bit32 = "5.3.5.1-1", -- dependency for luaposix on Lua 5.1 | 3 | bit32 = "5.3.5.1-1", -- dependency for luaposix on Lua 5.1 |
4 | cluacov = "0.1.2-1", | 4 | cluacov = "0.1.2-1", |
5 | copas = "3.0.0-1", | 5 | copas = "3.0.0-2", |
6 | cprint = "0.2-1", | ||
7 | dkjson = "2.6-1", | ||
6 | lpeg = "1.0.0-1", | 8 | lpeg = "1.0.0-1", |
7 | luacov = "0.15.0-1", | 9 | luacov = "0.15.0-1", |
8 | luafilesystem = "1.8.0-1", | 10 | luafilesystem = "1.8.0-1", |