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