aboutsummaryrefslogtreecommitdiff
path: root/spec/help_spec.lua
blob: 0f40dd38cf76edbd192b33806696bc6d21d22910 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
local test_env = require("test/test_environment")
local lfs = require("lfs")

test_env.unload_luarocks()
local help = require("luarocks.help")

expose("LuaRocks help tests #blackbox #b_help", function()

   before_each(function()
      test_env.setup_specs(extra_rocks)
      run = test_env.run
   end)

   it("LuaRocks help with no flags/arguments", function()
      assert.is_true(run.luarocks_bool("help"))
   end)

   it("LuaRocks help invalid argument", function()
      assert.is_false(run.luarocks_bool("help invalid"))
   end)
   
   it("LuaRocks help config", function()
      assert.is_true(run.luarocks_bool("help config"))
   end)
   
   it("LuaRocks-admin help with no flags/arguments", function()
      assert.is_true(run.luarocks_admin_bool("help"))
   end)
end)