From 1d989f22684951c82d442f8aeb0e50e9aa4ef059 Mon Sep 17 00:00:00 2001 From: James Saryerwinnie Date: Tue, 11 Feb 2014 13:06:18 -0800 Subject: [PATCH] Add test for #622 This also will catch any groff warnings printed to stderr. Depends on: https://github.com/boto/bcdoc/pull/27 --- awscli/help.py | 2 +- tests/unit/docs/test_help_output.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/awscli/help.py b/awscli/help.py index f5857fe59aab..25218a427b3f 100644 --- a/awscli/help.py +++ b/awscli/help.py @@ -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) diff --git a/tests/unit/docs/test_help_output.py b/tests/unit/docs/test_help_output.py index a2ce9276d533..563d7a4c3a7c 100644 --- a/tests/unit/docs/test_help_output.py +++ b/tests/unit/docs/test_help_output.py @@ -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):