aboutsummaryrefslogtreecommitdiff
path: root/spec/test_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/test_spec.lua')
-rw-r--r--spec/test_spec.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/test_spec.lua b/spec/test_spec.lua
index 943d0e48..21844d63 100644
--- a/spec/test_spec.lua
+++ b/spec/test_spec.lua
@@ -10,7 +10,7 @@ test_env.unload_luarocks()
10local extra_rocks = { 10local extra_rocks = {
11 "/busted-2.0.0-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-${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-2.5-2.src.rock",
16 "/say-1.3-1.rockspec", 16 "/say-1.3-1.rockspec",
@@ -41,6 +41,7 @@ describe("luarocks test #integration", function()
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 for _, r in ipairs(extra_rocks) do 43 for _, r in ipairs(extra_rocks) do
44 r = test_env.V(r)
44 local n, v = r:match("^/(.*)%-([^%-]+)%-%d+%.[^%-]+$") 45 local n, v = r:match("^/(.*)%-([^%-]+)%-%d+%.[^%-]+$")
45 os.execute("luarocks pack " .. n .. " " .. v) 46 os.execute("luarocks pack " .. n .. " " .. v)
46 end 47 end
@@ -84,17 +85,17 @@ describe("luarocks test #integration", function()
84 assert.is_true(run.luarocks_bool("unpack busted_project-0.1-1.src.rock")) 85 assert.is_true(run.luarocks_bool("unpack busted_project-0.1-1.src.rock"))
85 lfs.chdir("busted_project-0.1-1/busted_project") 86 lfs.chdir("busted_project-0.1-1/busted_project")
86 assert.is_true(run.luarocks_bool("make")) 87 assert.is_true(run.luarocks_bool("make"))
87 88
88 run.luarocks_bool("remove busted") 89 run.luarocks_bool("remove busted")
89 local prepareOutput = run.luarocks_bool("test --prepare") 90 local prepareOutput = run.luarocks_bool("test --prepare")
90 assert.is_true(run.luarocks_bool("show busted")) 91 assert.is_true(run.luarocks_bool("show busted"))
91 92
92 -- Assert that "test --prepare" run successfully 93 -- Assert that "test --prepare" run successfully
93 assert.is_true(prepareOutput) 94 assert.is_true(prepareOutput)
94 95
95 local output = run.luarocks("test") 96 local output = run.luarocks("test")
96 assert.not_match(tostring(prepareOutput), output) 97 assert.not_match(tostring(prepareOutput), output)
97 98
98 end) 99 end)
99 end) 100 end)
100end) 101end)