From 48b98f0c099dc621e1f93cccf9a9e03ff75649b6 Mon Sep 17 00:00:00 2001 From: roboo Date: Thu, 14 Jul 2016 01:15:38 +0200 Subject: Fix of luasocket binary rock tests --- spec/install_spec.lua | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'spec') diff --git a/spec/install_spec.lua b/spec/install_spec.lua index 9bc11e87..0b2ffb53 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua @@ -83,20 +83,24 @@ describe("LuaRocks install tests #blackbox #b_install", function() end) it("LuaRocks install only-deps of luasocket packed rock", function() - local output = run.luarocks("install --only-deps " .. testing_paths.testing_cache .. "/luasocket-3.0rc1-1." .. test_env.platform .. ".rock") + assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket")) + local output = run.luarocks("install --only-deps " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock") assert.are.same(output, "Successfully installed dependencies for luasocket 3.0rc1-1") + assert.is_true(os.remove("luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) + end) + + it("LuaRocks install reinstall", function() + assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket")) + assert.is_true(run.luarocks_bool("install " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) + assert.is_true(run.luarocks_bool("install --deps-mode=none " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) + assert.is_true(os.remove("luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) end) it("LuaRocks install binary rock of cprint", function() assert.is_true(run.luarocks_bool("build --pack-binary-rock cprint")) assert.is_true(run.luarocks_bool("install cprint-0.1-2." .. test_env.platform .. ".rock")) assert.is_true(os.remove("cprint-0.1-2." .. test_env.platform .. ".rock")) - end) - - it("LuaRocks install reinstall", function() - assert.is_true(run.luarocks_bool("install " .. testing_paths.testing_cache .. "/luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) - assert.is_true(run.luarocks_bool("install --deps-mode=none " .. testing_paths.testing_cache .. "/luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) - end) + end) end) describe("New install functionality based on pull request 552", function() -- cgit v1.2.3-55-g6feb