aboutsummaryrefslogtreecommitdiff
path: root/spec/purge_spec.lua
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2020-02-14 09:53:12 -0300
committerHisham Muhammad <hisham@gobolinux.org>2020-02-14 09:53:12 -0300
commitbd27d052eaf856bf24c77f556a50b7e19f11cba1 (patch)
tree9812779fea52afea7dbbf15a21620d3c59102476 /spec/purge_spec.lua
parentab0d7b2a266ff7f322af93915472f5d80d4be9af (diff)
downloadluarocks-bd27d052eaf856bf24c77f556a50b7e19f11cba1.tar.gz
luarocks-bd27d052eaf856bf24c77f556a50b7e19f11cba1.tar.bz2
luarocks-bd27d052eaf856bf24c77f556a50b7e19f11cba1.zip
tests: shorter descriptions
Diffstat (limited to 'spec/purge_spec.lua')
-rw-r--r--spec/purge_spec.lua38
1 files changed, 18 insertions, 20 deletions
diff --git a/spec/purge_spec.lua b/spec/purge_spec.lua
index 18445b60..ccd26bdf 100644
--- a/spec/purge_spec.lua
+++ b/spec/purge_spec.lua
@@ -8,29 +8,27 @@ local extra_rocks = {
8 "/say-1.0-1.src.rock", 8 "/say-1.0-1.src.rock",
9} 9}
10 10
11describe("LuaRocks purge tests #integration", function() 11describe("luarocks purge #integration", function()
12 before_each(function() 12 before_each(function()
13 test_env.setup_specs(extra_rocks) 13 test_env.setup_specs(extra_rocks)
14 end) 14 end)
15 15
16 describe("LuaRocks purge basic tests", function() 16 it("missing tree", function()
17 it("LuaRocks purge missing tree", function() 17 assert.is_false(run.luarocks_bool("purge --tree=" .. testing_paths.testing_tree))
18 assert.is_false(run.luarocks_bool("purge --tree=" .. testing_paths.testing_tree)) 18 end)
19 end) 19 it("tree with no string", function()
20 it("LuaRocks purge tree with no string", function() 20 assert.is_false(run.luarocks_bool("purge --tree="))
21 assert.is_false(run.luarocks_bool("purge --tree=")) 21 end)
22 end) 22 it("tree with no string", function()
23 it("LuaRocks purge tree with no string", function() 23 assert.is_true(run.luarocks_bool("purge --tree=" .. testing_paths.testing_sys_tree))
24 assert.is_true(run.luarocks_bool("purge --tree=" .. testing_paths.testing_sys_tree)) 24 end)
25 end) 25 it("tree missing files", function()
26 it("LuaRocks purge tree missing files", function() 26 assert.is_true(run.luarocks_bool("install say 1.0"))
27 assert.is_true(run.luarocks_bool("install say 1.0")) 27 test_env.remove_dir(testing_paths.testing_sys_tree .. "/share/lua/"..test_env.lua_version.."/say")
28 test_env.remove_dir(testing_paths.testing_sys_tree .. "/share/lua/"..test_env.lua_version.."/say") 28 assert.is_true(run.luarocks_bool("purge --tree=" .. testing_paths.testing_sys_tree))
29 assert.is_true(run.luarocks_bool("purge --tree=" .. testing_paths.testing_sys_tree)) 29 assert.is_false(test_env.exists(testing_paths.testing_sys_rocks .. "/say"))
30 assert.is_false(test_env.exists(testing_paths.testing_sys_rocks .. "/say")) 30 end)
31 end) 31 it("old versions tree", function()
32 it("LuaRocks purge old versions tree", function() 32 assert.is_true(run.luarocks_bool("purge --old-versions --tree=" .. testing_paths.testing_sys_tree))
33 assert.is_true(run.luarocks_bool("purge --old-versions --tree=" .. testing_paths.testing_sys_tree))
34 end)
35 end) 33 end)
36end) 34end)