summaryrefslogtreecommitdiff
path: root/tests/test_formatting.py
diff options
context:
space:
mode:
authorSimon Jagoe <simon@simonjagoe.com>2015-04-02 20:08:21 +0100
committerMarkus Unterwaditzer <markus@unterwaditzer.net>2015-04-26 14:11:32 +0200
commit4e519da58ac79fbd97eb86eb7717603d77eec379 (patch)
treeea89a050361ea9e6b8f2f3f7c739ed15d223ad7d /tests/test_formatting.py
parent61cf523ec891b1d34962fd000de94836cd6015e4 (diff)
downloadclick-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.py21
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.',
+ ]