summaryrefslogtreecommitdiff
path: root/spec/test_spec.lua
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2020-02-07 10:42:50 +0100
committerGitHub <noreply@github.com>2020-02-07 10:42:50 +0100
commit1a7f921e4cf1d4023340a8ba4dde17cb3e6bd311 (patch)
tree1c56d34fe38719bd41815c914c53294e5e4bb3e0 /spec/test_spec.lua
parent201ac63c7692355b07b83034c1813c000ec70e84 (diff)
downloadluarocks-1a7f921e4cf1d4023340a8ba4dde17cb3e6bd311.tar.gz
luarocks-1a7f921e4cf1d4023340a8ba4dde17cb3e6bd311.tar.bz2
luarocks-1a7f921e4cf1d4023340a8ba4dde17cb3e6bd311.zip
fix downgrades of rocks containing directories (#1151)
Fixes #1141
Diffstat (limited to 'spec/test_spec.lua')
-rw-r--r--spec/test_spec.lua18
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/test_spec.lua b/spec/test_spec.lua
index ca1d5917..ddb64b0e 100644
--- a/spec/test_spec.lua
+++ b/spec/test_spec.lua
@@ -8,13 +8,13 @@ local write_file = test_env.write_file
8test_env.unload_luarocks() 8test_env.unload_luarocks()
9 9
10local extra_rocks = { 10local extra_rocks = {
11 "/busted-2.0.rc12-1.rockspec", 11 "/busted-2.0.0-1.rockspec",
12 "/lua_cliargs-3.0-1.src.rock", 12 "/lua_cliargs-3.0-1.src.rock",
13 "/luafilesystem-1.7.0-2.src.rock", 13 "/luafilesystem-1.7.0-2.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-2.5-2.src.rock",
16 "/say-1.3-1.rockspec", 16 "/say-1.3-1.rockspec",
17 "/luassert-1.7.10-0.rockspec", 17 "/luassert-1.8.0-0.rockspec",
18 "/lua-term-0.7-1.rockspec", 18 "/lua-term-0.7-1.rockspec",
19 "/penlight-1.5.4-1.rockspec", 19 "/penlight-1.5.4-1.rockspec",
20 "/mediator_lua-1.1.2-0.rockspec", 20 "/mediator_lua-1.1.2-0.rockspec",
@@ -40,16 +40,10 @@ describe("luarocks test #integration", function()
40 40
41 lazy_setup(function() 41 lazy_setup(function()
42 -- Try to cache rocks from the host system to speed up test 42 -- Try to cache rocks from the host system to speed up test
43 os.execute("luarocks pack busted") 43 for _, r in ipairs(extra_rocks) do
44 os.execute("luarocks pack lua_cliargs") 44 local n, v = r:match("^/(.*)%-([^%-]+)%-%d+%.[^%-]+$")
45 os.execute("luarocks pack luafilesystem") 45 os.execute("luarocks pack " .. n .. " " .. v)
46 os.execute("luarocks pack dkjson") 46 end
47 os.execute("luarocks pack luasystem")
48 os.execute("luarocks pack say")
49 os.execute("luarocks pack luassert")
50 os.execute("luarocks pack lua-term")
51 os.execute("luarocks pack penlight")
52 os.execute("luarocks pack mediator_lua")
53 if test_env.TEST_TARGET_OS == "windows" then 47 if test_env.TEST_TARGET_OS == "windows" then
54 os.execute("move *.rock " .. testing_paths.testing_server) 48 os.execute("move *.rock " .. testing_paths.testing_server)
55 else 49 else