aboutsummaryrefslogtreecommitdiff
path: root/spec/purge_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/purge_spec.lua')
-rw-r--r--spec/purge_spec.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/purge_spec.lua b/spec/purge_spec.lua
new file mode 100644
index 00000000..09a9d433
--- /dev/null
+++ b/spec/purge_spec.lua
@@ -0,0 +1,28 @@
1local test_env = require("test/test_environment")
2local run = test_env.run
3local testing_paths = test_env.testing_paths
4
5test_env.unload_luarocks()
6
7describe("LuaRocks purge tests #blackbox #b_purge", function()
8 before_each(function()
9 test_env.setup_specs()
10 end)
11
12 describe("LuaRocks purge basic tests", function()
13 it("LuaRocks purge missing tree", function()
14 assert.is_false(run.luarocks_bool("purge --tree=" .. testing_paths.testing_tree))
15 end)
16 it("LuaRocks purge tree with no string", function()
17 assert.is_false(run.luarocks_bool("purge --tree=1"))
18 end)
19 it("LuaRocks purge tree with no string", function()
20 assert.is_true(run.luarocks_bool("purge --tree=" .. testing_paths.testing_sys_tree))
21 end)
22 it("LuaRocks purge old versions tree", function()
23 assert.is_true(run.luarocks_bool("purge --old-versions --tree=" .. testing_paths.testing_sys_tree))
24 end)
25 end)
26end)
27
28