diff options
Diffstat (limited to 'spec/install_spec.lua')
-rw-r--r-- | spec/install_spec.lua | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/spec/install_spec.lua b/spec/install_spec.lua index bd480c21..8857e4bd 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,15 +66,15 @@ 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 | assert.is_true(run.luarocks_bool("install luasec " .. test_env.OPENSSL_DIRS)) |
70 | assert.is_true(run.luarocks_bool("show luasocket")) | 70 | assert.is_true(run.luarocks_bool("show luasocket")) |
71 | end) | 71 | end) |
72 | end) | 72 | end) |
73 | 73 | ||
74 | describe("LuaRocks install - more complex tests", function() | 74 | describe("LuaRocks install - more complex tests", function() |
75 | it('LuaRocks install luasec with skipping dependency checks', function() | 75 | it('LuaRocks install luasec with skipping dependency checks', function() |
76 | run.luarocks_bool(test_env.quiet(" install luasec --nodeps")) | 76 | assert.is_true(run.luarocks_bool("install luasec " .. test_env.OPENSSL_DIRS .. " --nodeps")) |
77 | assert.is_true(run.luarocks_bool(test_env.quiet("show luasec"))) | 77 | assert.is_true(run.luarocks_bool("show luasec")) |
78 | if env_variables.TYPE_TEST_ENV == "minimal" then | 78 | if env_variables.TYPE_TEST_ENV == "minimal" then |
79 | assert.is_false(run.luarocks_bool(test_env.quiet("show luasocket"))) | 79 | assert.is_false(run.luarocks_bool(test_env.quiet("show luasocket"))) |
80 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasocket")) | 80 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasocket")) |
@@ -83,21 +83,21 @@ describe("LuaRocks install tests #blackbox #b_install", function() | |||
83 | end) | 83 | end) |
84 | 84 | ||
85 | it("LuaRocks install only-deps of luasocket packed rock", function() | 85 | 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"))) | 86 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket 3.0rc1-2")) |
87 | local output = run.luarocks("install --only-deps " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock") | 87 | 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") | 88 | 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")) | 89 | assert.is_true(os.remove("luasocket-3.0rc1-2." .. test_env.platform .. ".rock")) |
90 | end) | 90 | end) |
91 | 91 | ||
92 | it("LuaRocks install reinstall", function() | 92 | it("LuaRocks install reinstall", function() |
93 | assert.is_true(run.luarocks_bool(test_env.quiet("build --pack-binary-rock luasocket 3.0rc1-1"))) | 93 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket 3.0rc1-2")) |
94 | assert.is_true(run.luarocks_bool("install " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) | 94 | 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")) | 95 | 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")) | 96 | assert.is_true(os.remove("luasocket-3.0rc1-2." .. test_env.platform .. ".rock")) |
97 | end) | 97 | end) |
98 | 98 | ||
99 | it("LuaRocks install binary rock of cprint", function() | 99 | it("LuaRocks install binary rock of cprint", function() |
100 | assert.is_true(run.luarocks_bool(test_env.quiet("build --pack-binary-rock cprint"))) | 100 | assert.is_true(run.luarocks_bool("build --pack-binary-rock cprint")) |
101 | assert.is_true(run.luarocks_bool("install cprint-0.1-2." .. test_env.platform .. ".rock")) | 101 | assert.is_true(run.luarocks_bool("install cprint-0.1-2." .. test_env.platform .. ".rock")) |
102 | assert.is_true(os.remove("cprint-0.1-2." .. test_env.platform .. ".rock")) | 102 | assert.is_true(os.remove("cprint-0.1-2." .. test_env.platform .. ".rock")) |
103 | end) | 103 | end) |