diff options
Diffstat (limited to 'spec/purge_spec.lua')
-rw-r--r-- | spec/purge_spec.lua | 28 |
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 @@ | |||
1 | local test_env = require("test/test_environment") | ||
2 | local run = test_env.run | ||
3 | local testing_paths = test_env.testing_paths | ||
4 | |||
5 | test_env.unload_luarocks() | ||
6 | |||
7 | describe("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) | ||
26 | end) | ||
27 | |||
28 | |||