diff options
| author | George Roman <george.roman.99@gmail.com> | 2018-07-07 18:49:41 +0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-16 20:34:30 -0300 |
| commit | 4b3ee931cd8ecc5937811cd8e9316d79c0c9c00e (patch) | |
| tree | 9b5f36a8f75df296b1bace3413eb4967d9325729 /spec/remove_spec.lua | |
| parent | 1b3b6525a4313404af84fce0fbbc29695e664f73 (diff) | |
| download | luarocks-4b3ee931cd8ecc5937811cd8e9316d79c0c9c00e.tar.gz luarocks-4b3ee931cd8ecc5937811cd8e9316d79c0c9c00e.tar.bz2 luarocks-4b3ee931cd8ecc5937811cd8e9316d79c0c9c00e.zip | |
Add general improvements to the fs module
Diffstat (limited to 'spec/remove_spec.lua')
| -rw-r--r-- | spec/remove_spec.lua | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/spec/remove_spec.lua b/spec/remove_spec.lua index 55264a75..f43b55c6 100644 --- a/spec/remove_spec.lua +++ b/spec/remove_spec.lua | |||
| @@ -7,9 +7,9 @@ test_env.unload_luarocks() | |||
| 7 | 7 | ||
| 8 | local extra_rocks = { | 8 | local extra_rocks = { |
| 9 | "/abelhas-1.1-1.rockspec", | 9 | "/abelhas-1.1-1.rockspec", |
| 10 | "/lualogging-1.3.0-1.src.rock", | 10 | "/copas-2.0.1-1.src.rock", |
| 11 | "/luasocket-3.0rc1-2.src.rock", | 11 | "/coxpcall-1.16.0-1.src.rock", |
| 12 | "/luasocket-3.0rc1-2.rockspec" | 12 | "/coxpcall-1.16.0-1.rockspec" |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | describe("LuaRocks remove tests #integration", function() | 15 | describe("LuaRocks remove tests #integration", function() |
| @@ -52,38 +52,38 @@ describe("LuaRocks remove tests #integration", function() | |||
| 52 | 52 | ||
| 53 | describe("LuaRocks remove more complex tests", function() | 53 | describe("LuaRocks remove more complex tests", function() |
| 54 | before_each(function() | 54 | before_each(function() |
| 55 | assert.is.truthy(test_env.need_rock("luasocket")) | 55 | assert.is.truthy(test_env.need_rock("coxpcall")) |
| 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_rocks .. "/luasocket")) | 59 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) |
| 60 | assert.is_true(run.luarocks_bool("build lualogging")) | 60 | assert.is_true(run.luarocks_bool("build copas")) |
| 61 | 61 | ||
| 62 | assert.is_false(run.luarocks_bool("remove luasocket")) | 62 | assert.is_false(run.luarocks_bool("remove coxpcall")) |
| 63 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket")) | 63 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) |
| 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_rocks .. "/luasocket")) | 67 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) |
| 68 | assert.is_true(run.luarocks_bool("build lualogging")) | 68 | assert.is_true(run.luarocks_bool("build copas")) |
| 69 | 69 | ||
| 70 | local output = run.luarocks("remove --force luasocket") | 70 | local output = run.luarocks("remove --force coxpcall") |
| 71 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket")) | 71 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) |
| 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_rocks .. "/luasocket")) | 76 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) |
| 77 | assert.is_true(run.luarocks_bool("build lualogging")) | 77 | assert.is_true(run.luarocks_bool("build copas")) |
| 78 | 78 | ||
| 79 | local output = run.luarocks("remove --force-fast luasocket") | 79 | local output = run.luarocks("remove --force-fast coxpcall") |
| 80 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket")) | 80 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) |
| 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) |
| 84 | 84 | ||
| 85 | it("#admin remove #ssh", function() | 85 | it("#admin remove #ssh", function() |
| 86 | assert.is_true(run.luarocks_admin_bool("--server=testing remove luasocket-3.0rc1-2.src.rock")) | 86 | assert.is_true(run.luarocks_admin_bool("--server=testing remove coxpcall-1.16.0-1.src.rock")) |
| 87 | end) | 87 | end) |
| 88 | 88 | ||
| 89 | it("#admin remove missing", function() | 89 | it("#admin remove missing", function() |
