Skip to content
Snippets Groups Projects
Commit b53f0c5a authored by Martin Afanasjew's avatar Martin Afanasjew
Browse files

tests: expand help and help-related tests


Closes #114.

Signed-off-by: default avatarMartin Afanasjew <martin@afanasjew.de>
parent d9363a15
No related branches found
No related tags found
No related merge requests found
......@@ -130,8 +130,21 @@ class IntegrationCommandTests < Homebrew::TestCase
end
def test_help
assert_match "Example usage:",
cmd("help")
assert_match "Example usage:\n",
cmd_fail # Generic help (empty argument list).
assert_match "Unknown command: command-that-does-not-exist",
cmd_fail("help", "command-that-does-not-exist")
assert_match(/^brew cat /,
cmd_fail("cat")) # Missing formula argument triggers help.
assert_match "Example usage:\n",
cmd("help") # Generic help.
assert_match(/^brew cat /,
cmd("help", "cat")) # Internal command (documented, Ruby).
assert_match(/^brew update /,
cmd("help", "update")) # Internal command (documented, Shell).
assert_match "Example usage:\n",
cmd("help", "test-bot") # Internal command (undocumented).
end
def test_config
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment