diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2017-10-04 11:14:42 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-04 11:14:42 -0300 |
| commit | 84b4fe99cac37850a97858e0b641043bd3178d8a (patch) | |
| tree | b4578689091b8360aed71f531faf2513b7d41684 /spec/remove_spec.lua | |
| parent | 100c18d048936b5a47f29f55e6ce8b24277fb70f (diff) | |
| download | luarocks-84b4fe99cac37850a97858e0b641043bd3178d8a.tar.gz luarocks-84b4fe99cac37850a97858e0b641043bd3178d8a.tar.bz2 luarocks-84b4fe99cac37850a97858e0b641043bd3178d8a.zip | |
Use versioned files only. (#734)
Let's take the opportunity of a new major version to make an important cleanup: getting rid of the error-prone unversioned configuration files. This drops support for:
* Unversioned config.lua -> use config-5.x.lua
* Unversioned luarocks/site_config.lua -> it always generates luarocks/core/site_config_5_x.lua
* Unversioned lib/luarocks/rocks -> it always uses lib/luarocks/rocks-5.x
Diffstat (limited to 'spec/remove_spec.lua')
| -rw-r--r-- | spec/remove_spec.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/remove_spec.lua b/spec/remove_spec.lua index 03b3681e..4d3f5cdc 100644 --- a/spec/remove_spec.lua +++ b/spec/remove_spec.lua | |||
| @@ -37,16 +37,16 @@ describe("LuaRocks remove tests #blackbox #b_remove", function() | |||
| 37 | 37 | ||
| 38 | it("LuaRocks remove built abelhas", function() | 38 | it("LuaRocks remove built abelhas", function() |
| 39 | assert.is_true(run.luarocks_bool("build abelhas 1.0")) | 39 | assert.is_true(run.luarocks_bool("build abelhas 1.0")) |
| 40 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/abelhas")) | 40 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/abelhas")) |
| 41 | assert.is_true(run.luarocks_bool("remove abelhas 1.0")) | 41 | assert.is_true(run.luarocks_bool("remove abelhas 1.0")) |
| 42 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/abelhas")) | 42 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/abelhas")) |
| 43 | end) | 43 | end) |
| 44 | 44 | ||
| 45 | it("LuaRocks remove built abelhas with uppercase name", function() | 45 | it("LuaRocks remove built abelhas with uppercase name", function() |
| 46 | assert.is_true(run.luarocks_bool("build abelhas 1.0")) | 46 | assert.is_true(run.luarocks_bool("build abelhas 1.0")) |
| 47 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/abelhas")) | 47 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/abelhas")) |
| 48 | assert.is_true(run.luarocks_bool("remove Abelhas 1.0")) | 48 | assert.is_true(run.luarocks_bool("remove Abelhas 1.0")) |
| 49 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/abelhas")) | 49 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/abelhas")) |
| 50 | end) | 50 | end) |
| 51 | end) | 51 | end) |
| 52 | 52 | ||
| @@ -56,28 +56,28 @@ describe("LuaRocks remove tests #blackbox #b_remove", function() | |||
| 56 | end) | 56 | end) |
| 57 | 57 | ||
| 58 | it("LuaRocks remove fail, break dependencies", function() | 58 | it("LuaRocks remove fail, break dependencies", function() |
| 59 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasocket")) | 59 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket")) |
| 60 | assert.is_true(run.luarocks_bool("build lualogging")) | 60 | assert.is_true(run.luarocks_bool("build lualogging")) |
| 61 | 61 | ||
| 62 | assert.is_false(run.luarocks_bool("remove luasocket")) | 62 | assert.is_false(run.luarocks_bool("remove luasocket")) |
| 63 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasocket")) | 63 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket")) |
| 64 | end) | 64 | end) |
| 65 | 65 | ||
| 66 | it("LuaRocks remove force", function() | 66 | it("LuaRocks remove force", function() |
| 67 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasocket")) | 67 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket")) |
| 68 | assert.is_true(run.luarocks_bool("build lualogging")) | 68 | assert.is_true(run.luarocks_bool("build lualogging")) |
| 69 | 69 | ||
| 70 | local output = run.luarocks("remove --force luasocket") | 70 | local output = run.luarocks("remove --force luasocket") |
| 71 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasocket")) | 71 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket")) |
| 72 | assert.is.truthy(output:find("Checking stability of dependencies")) | 72 | assert.is.truthy(output:find("Checking stability of dependencies")) |
| 73 | end) | 73 | end) |
| 74 | 74 | ||
| 75 | it("LuaRocks remove force fast", function() | 75 | it("LuaRocks remove force fast", function() |
| 76 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasocket")) | 76 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket")) |
| 77 | assert.is_true(run.luarocks_bool("build lualogging")) | 77 | assert.is_true(run.luarocks_bool("build lualogging")) |
| 78 | 78 | ||
| 79 | local output = run.luarocks("remove --force-fast luasocket") | 79 | local output = run.luarocks("remove --force-fast 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_rocks .. "/luasocket")) |
| 81 | assert.is.falsy(output:find("Checking stability of dependencies")) | 81 | assert.is.falsy(output:find("Checking stability of dependencies")) |
| 82 | end) | 82 | end) |
| 83 | end) | 83 | end) |
