diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2016-07-14 14:43:42 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-14 14:43:42 -0300 |
| commit | 36388709d628a76c450eed20b67f008faefc36cb (patch) | |
| tree | e9e8a6959ecafcd8355b8b9614f65a613fe6ddb4 /spec/install_spec.lua | |
| parent | 0f63a95e991435c769584abd01b16bd748a1434b (diff) | |
| parent | 48b98f0c099dc621e1f93cccf9a9e03ff75649b6 (diff) | |
| download | luarocks-36388709d628a76c450eed20b67f008faefc36cb.tar.gz luarocks-36388709d628a76c450eed20b67f008faefc36cb.tar.bz2 luarocks-36388709d628a76c450eed20b67f008faefc36cb.zip | |
Merge pull request #588 from robooo/new-tests
New tests
Diffstat (limited to 'spec/install_spec.lua')
| -rw-r--r-- | spec/install_spec.lua | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/spec/install_spec.lua b/spec/install_spec.lua index 0e406e22..0b2ffb53 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua | |||
| @@ -83,23 +83,24 @@ 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(test_env.need_luasocket()) | 86 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket")) |
| 87 | local output = run.luarocks("install --only-deps " .. testing_paths.testing_cache .. "/luasocket-3.0rc1-1." .. test_env.platform .. ".rock") | 87 | local output = run.luarocks("install --only-deps " .. "luasocket-3.0rc1-1." .. 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-1") |
| 89 | assert.is_true(os.remove("luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) | ||
| 90 | end) | ||
| 91 | |||
| 92 | it("LuaRocks install reinstall", function() | ||
| 93 | assert.is_true(run.luarocks_bool("build --pack-binary-rock luasocket")) | ||
| 94 | assert.is_true(run.luarocks_bool("install " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) | ||
| 95 | assert.is_true(run.luarocks_bool("install --deps-mode=none " .. "luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) | ||
| 96 | assert.is_true(os.remove("luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) | ||
| 89 | end) | 97 | end) |
| 90 | 98 | ||
| 91 | it("LuaRocks install binary rock of cprint", function() | 99 | it("LuaRocks install binary rock of cprint", function() |
| 92 | assert.is_true(test_env.need_luasocket()) | ||
| 93 | assert.is_true(run.luarocks_bool("build --pack-binary-rock cprint")) | 100 | assert.is_true(run.luarocks_bool("build --pack-binary-rock cprint")) |
| 94 | 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")) |
| 95 | 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")) |
| 96 | end) | 103 | end) |
| 97 | |||
| 98 | it("LuaRocks install reinstall", function() | ||
| 99 | assert.is_true(test_env.need_luasocket()) | ||
| 100 | assert.is_true(run.luarocks_bool("install " .. testing_paths.testing_cache .. "/luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) | ||
| 101 | assert.is_true(run.luarocks_bool("install --deps-mode=none " .. testing_paths.testing_cache .. "/luasocket-3.0rc1-1." .. test_env.platform .. ".rock")) | ||
| 102 | end) | ||
| 103 | end) | 104 | end) |
| 104 | 105 | ||
| 105 | describe("New install functionality based on pull request 552", function() | 106 | describe("New install functionality based on pull request 552", function() |
