Skip to content

Commit

Permalink
Add test for aws#622
Browse files Browse the repository at this point in the history
This also will catch any groff warnings printed to stderr.
Depends on: boto/bcdoc#27
  • Loading branch information
jamesls committed Feb 11, 2014
1 parent 4b35512 commit 1d989f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion awscli/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def render(self, contents):
raise ExecutableNotFoundError('groff')
cmdline = ['groff', '-man', '-T', 'ascii']
LOG.debug("Running command: %s", cmdline)
p3 = self._popen(cmdline, stdin=PIPE, stdout=PIPE)
p3 = self._popen(cmdline, stdin=PIPE, stdout=PIPE, stderr=PIPE)
groff_output = p3.communicate(input=man_contents)[0]
cmdline = self.get_pager_cmdline()
LOG.debug("Running command: %s", cmdline)
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/docs/test_help_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ def test_add_help_for_dryrun(self):
self.assert_contains('DryRunOperation')
self.assert_contains('UnauthorizedOperation')

def test_elb_help_output(self):
self.driver.main(['elb', 'help'])
# We should *not* have any invalid links like
# .. _`:
self.assert_not_contains('.. _`:')


class TestRemoveDeprecatedCommands(BaseAWSHelpOutputTest):
def assert_command_does_not_exist(self, service, command):
Expand Down

0 comments on commit 1d989f2

Please sign in to comment.