aboutsummaryrefslogtreecommitdiff
path: root/spec/show_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/show_spec.lua')
-rw-r--r--spec/show_spec.lua56
1 files changed, 56 insertions, 0 deletions
diff --git a/spec/show_spec.lua b/spec/show_spec.lua
new file mode 100644
index 00000000..85797eb6
--- /dev/null
+++ b/spec/show_spec.lua
@@ -0,0 +1,56 @@
1local test_env = require("test/test_environment")
2local lfs = require("lfs")
3
4test_env.unload_luarocks()
5local show = require("luarocks.show")
6
7expose("LuaRocks show tests #blackbox #b_show", function()
8
9 before_each(function()
10 test_env.setup_specs(extra_rocks)
11 run = test_env.run
12 end)
13
14 it("LuaRocks show with no flags/arguments", function()
15 assert.is_false(run.luarocks_bool("show"))
16 end)
17
18 describe("LuaRocks show basic tests with flags", function()
19 it("LuaRocks show invalid", function()
20 assert.is_false(run.luarocks_bool("show invalid"))
21 end)
22
23 it("LuaRocks show luacov", function()
24 local output = run.luarocks("show luacov")
25 end)
26
27 it("LuaRocks show modules of luacov", function()
28 local output = run.luarocks("show --modules luacov")
29 end)
30
31 it("LuaRocks show dependencies of luacov", function()
32 local output = run.luarocks("show --deps luacov")
33 end)
34
35 it("LuaRocks show rockspec of luacov", function()
36 local output = run.luarocks("show --rockspec luacov")
37 end)
38
39 it("LuaRocks show mversion of luacov", function()
40 local output = run.luarocks("show --mversion luacov")
41 end)
42
43 it("LuaRocks show rock tree of luacov", function()
44 local output = run.luarocks("show --rock-tree luacov")
45 end)
46
47 it("LuaRocks show rock directory of luacov", function()
48 local output = run.luarocks("show --rock-dir luacov")
49 end)
50 end)
51
52 it("LuaRocks show old version of luacov", function()
53 run.luarocks("install luacov 0.11.0")
54 run.luarocks("show luacov 0.11.0")
55 end)
56end)