diff options
| author | Simon Jagoe <simon@simonjagoe.com> | 2015-04-02 20:08:21 +0100 |
|---|---|---|
| committer | Markus Unterwaditzer <markus@unterwaditzer.net> | 2015-04-26 14:11:32 +0200 |
| commit | 4e519da58ac79fbd97eb86eb7717603d77eec379 (patch) | |
| tree | ea89a050361ea9e6b8f2f3f7c739ed15d223ad7d /tests/test_formatting.py | |
| parent | 61cf523ec891b1d34962fd000de94836cd6015e4 (diff) | |
| download | click-4e519da58ac79fbd97eb86eb7717603d77eec379.tar.gz | |
Fix formatting issue when last line of docstring is blank
Diffstat (limited to 'tests/test_formatting.py')
| -rw-r--r-- | tests/test_formatting.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_formatting.py b/tests/test_formatting.py index 142db95..448f0d6 100644 --- a/tests/test_formatting.py +++ b/tests/test_formatting.py @@ -87,3 +87,24 @@ def test_wrapping_long_options_strings(runner): 'Options:', ' --help Show this message and exit.', ] + + +def test_formatting_empty_help_lines(runner): + @click.command() + def cli(): + """Top level command + + """ + + result = runner.invoke(cli, ['--help']) + assert not result.exception + assert result.output.splitlines() == [ + 'Usage: cli [OPTIONS]', + '', + ' Top level command', + '', + '', + '', + 'Options:', + ' --help Show this message and exit.', + ] |
