aboutsummaryrefslogtreecommitdiff
path: root/spec/install_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/install_spec.lua')
-rw-r--r--spec/install_spec.lua36
1 files changed, 22 insertions, 14 deletions
diff --git a/spec/install_spec.lua b/spec/install_spec.lua
index bd480c21..2b6cb77f 100644
--- a/spec/install_spec.lua
+++ b/spec/install_spec.lua
@@ -12,8 +12,8 @@ local extra_rocks = {
12 "/lpeg-0.12-1.src.rock", 12 "/lpeg-0.12-1.src.rock",
13 "/luasec-0.6-1.rockspec", 13 "/luasec-0.6-1.rockspec",
14 "/luassert-1.7.0-1.src.rock", 14 "/luassert-1.7.0-1.src.rock",
15 "/luasocket-3.0rc1-1.src.rock", 15 "/luasocket-3.0rc1-2.src.rock",
16 "/luasocket-3.0rc1-1.rockspec", 16 "/luasocket-3.0rc1-2.rockspec",
17 "/lxsh-0.8.6-2.src.rock", 17 "/lxsh-0.8.6-2.src.rock",
18 "/lxsh-0.8.6-2.rockspec", 18 "/lxsh-0.8.6-2.rockspec",
19 "/say-1.2-1.src.rock", 19 "/say-1.2-1.src.rock",
@@ -44,8 +44,8 @@ describe("LuaRocks install tests #blackbox #b_install", function()
44 assert.is_false(run.luarocks_bool("install \"invalid.rock\" ")) 44 assert.is_false(run.luarocks_bool("install \"invalid.rock\" "))
45 end) 45 end)
46 46
47 it("LuaRocks install with local flag as root", function() 47 it("LuaRocks install with local flag as root #unix", function()
48 assert.is_false(run.luarocks_bool("install --local luasocket", { USER = "root" } )) 48 assert.is_false(run.luarocks_bool("install --local luasocket ", { USER = "root" } ))
49 end) 49 end)
50 50
51 it("LuaRocks install not a zip file", function() 51 it("LuaRocks install not a zip file", function()
@@ -66,14 +66,22 @@ describe("LuaRocks install tests #blackbox #b_install", function()
66 end) 66 end)
67 67
68 it("LuaRocks install luasec and show luasocket (dependency)", function() 68 it("LuaRocks install luasec and show luasocket (dependency)", function()
69 assert.is_true(run.luarocks_bool("install luasec")) 69 if test_env.APPVEYOR then
70 assert.is_true(run.luarocks_bool(test_env.quiet("install luasec " .. test_env.APPVEYOR_OPENSSL)))
71 else
72 assert.is_true(run.luarocks_bool(test_env.quiet("install luasec")))
73 end
70 assert.is_true(run.luarocks_bool("show luasocket")) 74 assert.is_true(run.luarocks_bool("show luasocket"))
71 end) 75 end)
72 end) 76 end)
73 77
74 describe("LuaRocks install - more complex tests", function() 78 describe("LuaRocks install - more complex tests", function()
75 it('LuaRocks install luasec with skipping dependency checks', function() 79 it('LuaRocks install luasec with skipping dependency checks', function()
76 run.luarocks_bool(test_env.quiet(" install luasec --nodeps")) 80 if test_env.APPVEYOR then
81 assert.is_true(run.luarocks_bool(test_env.quiet("install luasec " .. test_env.APPVEYOR_OPENSSL .. " --nodeps")))
82 else
83 assert.is_true(run.luarocks_bool(test_env.quiet("install luasec --nodeps")))
84 end
77 assert.is_true(run.luarocks_bool(test_env.quiet("show luasec"))) 85 assert.is_true(run.luarocks_bool(test_env.quiet("show luasec")))
78 if env_variables.TYPE_TEST_ENV == "minimal" then 86 if env_variables.TYPE_TEST_ENV == "minimal" then
79 assert.is_false(run.luarocks_bool(test_env.quiet("show luasocket"))) 87 assert.is_false(run.luarocks_bool(test_env.quiet("show luasocket")))
@@ -83,17 +91,17 @@ describe("LuaRocks install tests #blackbox #b_install", function()
83 end) 91 end)
84 92
85 it("LuaRocks install only-deps of luasocket packed rock", function() 93 it("LuaRocks install only-deps of luasocket packed rock", function()
86 assert.is_true(run.luarocks_bool(test_env.quiet("build --pack-binary-rock luasocket 3.0rc1-1"))) 94 assert.is_true(run.luarocks_bool(test_env.quiet("build --pack-binary-rock luasocket 3.0rc1-2")))
87 local output = run.luarocks("install --only-deps " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock") 95 local output = run.luarocks("install --only-deps " .. "luasocket-3.0rc1-2." .. test_env.platform .. ".rock")
88 assert.are.same(output, "Successfully installed dependencies for luasocket 3.0rc1-1") 96 assert.are.same(output, "Successfully installed dependencies for luasocket 3.0rc1-2")
89 assert.is_true(os.remove("luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) 97 assert.is_true(os.remove("luasocket-3.0rc1-2." .. test_env.platform .. ".rock"))
90 end) 98 end)
91 99
92 it("LuaRocks install reinstall", function() 100 it("LuaRocks install reinstall", function()
93 assert.is_true(run.luarocks_bool(test_env.quiet("build --pack-binary-rock luasocket 3.0rc1-1"))) 101 assert.is_true(run.luarocks_bool(test_env.quiet("build --pack-binary-rock luasocket 3.0rc1-2")))
94 assert.is_true(run.luarocks_bool("install " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) 102 assert.is_true(run.luarocks_bool("install " .. "luasocket-3.0rc1-2." .. test_env.platform .. ".rock"))
95 assert.is_true(run.luarocks_bool("install --deps-mode=none " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) 103 assert.is_true(run.luarocks_bool("install --deps-mode=none " .. "luasocket-3.0rc1-2." .. test_env.platform .. ".rock"))
96 assert.is_true(os.remove("luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) 104 assert.is_true(os.remove("luasocket-3.0rc1-2." .. test_env.platform .. ".rock"))
97 end) 105 end)
98 106
99 it("LuaRocks install binary rock of cprint", function() 107 it("LuaRocks install binary rock of cprint", function()