diff options
Diffstat (limited to 'spec/help_spec.lua')
| -rw-r--r-- | spec/help_spec.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/help_spec.lua b/spec/help_spec.lua new file mode 100644 index 00000000..0f40dd38 --- /dev/null +++ b/spec/help_spec.lua | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | local test_env = require("test/test_environment") | ||
| 2 | local lfs = require("lfs") | ||
| 3 | |||
| 4 | test_env.unload_luarocks() | ||
| 5 | local help = require("luarocks.help") | ||
| 6 | |||
| 7 | expose("LuaRocks help tests #blackbox #b_help", function() | ||
| 8 | |||
| 9 | before_each(function() | ||
| 10 | test_env.setup_specs(extra_rocks) | ||
| 11 | run = test_env.run | ||
| 12 | end) | ||
| 13 | |||
| 14 | it("LuaRocks help with no flags/arguments", function() | ||
| 15 | assert.is_true(run.luarocks_bool("help")) | ||
| 16 | end) | ||
| 17 | |||
| 18 | it("LuaRocks help invalid argument", function() | ||
| 19 | assert.is_false(run.luarocks_bool("help invalid")) | ||
| 20 | end) | ||
| 21 | |||
| 22 | it("LuaRocks help config", function() | ||
| 23 | assert.is_true(run.luarocks_bool("help config")) | ||
| 24 | end) | ||
| 25 | |||
| 26 | it("LuaRocks-admin help with no flags/arguments", function() | ||
| 27 | assert.is_true(run.luarocks_admin_bool("help")) | ||
| 28 | end) | ||
| 29 | end) \ No newline at end of file | ||
