aboutsummaryrefslogtreecommitdiff
path: root/spec/purge_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--spec/purge_spec.lua32
1 files changed, 0 insertions, 32 deletions
diff --git a/spec/purge_spec.lua b/spec/purge_spec.lua
deleted file mode 100644
index 7fdb74f4..00000000
--- a/spec/purge_spec.lua
+++ /dev/null
@@ -1,32 +0,0 @@
1local test_env = require("spec.util.test_env")
2local run = test_env.run
3local testing_paths = test_env.testing_paths
4
5local extra_rocks = {
6 "/say-1.0-1.src.rock",
7}
8
9describe("luarocks purge #integration", function()
10 before_each(function()
11 test_env.setup_specs(extra_rocks)
12 end)
13
14 it("missing tree", function()
15 assert.is_false(run.luarocks_bool("purge --tree=" .. testing_paths.testing_tree))
16 end)
17 it("tree with no string", function()
18 assert.is_false(run.luarocks_bool("purge --tree="))
19 end)
20 it("tree with no string", function()
21 assert.is_true(run.luarocks_bool("purge --tree=" .. testing_paths.testing_sys_tree))
22 end)
23 it("tree missing files", function()
24 assert.is_true(run.luarocks_bool("install say 1.0"))
25 test_env.remove_dir(testing_paths.testing_sys_tree .. "/share/lua/"..test_env.lua_version.."/say")
26 assert.is_true(run.luarocks_bool("purge --tree=" .. testing_paths.testing_sys_tree))
27 assert.is_false(test_env.exists(testing_paths.testing_sys_rocks .. "/say"))
28 end)
29 it("old versions tree", function()
30 assert.is_true(run.luarocks_bool("purge --old-versions --tree=" .. testing_paths.testing_sys_tree))
31 end)
32end)