From 1656a4c7a2dac25d2dd2e5d2211ce0e7eb000b19 Mon Sep 17 00:00:00 2001 From: roboo Date: Thu, 14 Jul 2016 00:29:01 +0200 Subject: need_rock() added, new flag noreset environment --- spec/build_spec.lua | 2 -- spec/install_spec.lua | 3 --- spec/remove_spec.lua | 7 ++++--- 3 files changed, 4 insertions(+), 8 deletions(-) (limited to 'spec') diff --git a/spec/build_spec.lua b/spec/build_spec.lua index 1ce99089..682c6dcf 100644 --- a/spec/build_spec.lua +++ b/spec/build_spec.lua @@ -169,12 +169,10 @@ describe("LuaRocks build tests #blackbox #b_build", function() end) it("LuaRocks build missing external", function() - assert.is_true(test_env.need_luasocket()) assert.is_false(run.luarocks_bool("build " .. testing_paths.testing_dir .. "/testfiles/missing_external-0.1-1.rockspec INEXISTENT_INCDIR=\"/invalid/dir\"")) end) it("LuaRocks build invalid patch", function() - assert.is_true(test_env.need_luasocket()) assert.is_false(run.luarocks_bool("build " .. testing_paths.testing_dir .. "/testfiles/invalid_patch-0.1-1.rockspec")) end) end) diff --git a/spec/install_spec.lua b/spec/install_spec.lua index 0e406e22..9bc11e87 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua @@ -83,20 +83,17 @@ describe("LuaRocks install tests #blackbox #b_install", function() end) it("LuaRocks install only-deps of luasocket packed rock", function() - assert.is_true(test_env.need_luasocket()) local output = run.luarocks("install --only-deps " .. testing_paths.testing_cache .. "/luasocket-3.0rc1-1." .. test_env.platform .. ".rock") assert.are.same(output, "Successfully installed dependencies for luasocket 3.0rc1-1") end) it("LuaRocks install binary rock of cprint", function() - assert.is_true(test_env.need_luasocket()) 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(test_env.need_luasocket()) 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) diff --git a/spec/remove_spec.lua b/spec/remove_spec.lua index 41c6348a..c7f83b95 100644 --- a/spec/remove_spec.lua +++ b/spec/remove_spec.lua @@ -44,8 +44,11 @@ describe("LuaRocks remove tests #blackbox #b_remove", function() end) describe("LuaRocks remove more complex tests", function() + before_each(function() + assert.is_true(test_env.need_rock("luasocket")) + end) + it("LuaRocks remove fail, break dependencies", function() - assert.is_true(test_env.need_luasocket()) assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasocket")) assert.is_true(run.luarocks_bool("build lualogging")) @@ -54,7 +57,6 @@ describe("LuaRocks remove tests #blackbox #b_remove", function() end) it("LuaRocks remove force", function() - assert.is_true(test_env.need_luasocket()) assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasocket")) assert.is_true(run.luarocks_bool("build lualogging")) @@ -64,7 +66,6 @@ describe("LuaRocks remove tests #blackbox #b_remove", function() end) it("LuaRocks remove force fast", function() - assert.is_true(test_env.need_luasocket()) assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasocket")) assert.is_true(run.luarocks_bool("build lualogging")) -- cgit v1.2.3-55-g6feb