summaryrefslogtreecommitdiff
path: root/tests/test_commands.py
diff options
context:
space:
mode:
authorArmin Ronacher <armin.ronacher@active-4.com>2014-06-26 11:55:10 +0100
committerArmin Ronacher <armin.ronacher@active-4.com>2014-06-26 11:55:10 +0100
commit579262766b1e57d8b2dcca0607e8e8f665950b00 (patch)
treeccbfeda51195190f1d748ff20b6975dcba0fe97f /tests/test_commands.py
parentf1a846081b241c742c9700354ebe16f56c1c28fc (diff)
downloadclick-579262766b1e57d8b2dcca0607e8e8f665950b00.tar.gz
Improved automatic short help detection. This fixes #165
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r--tests/test_commands.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 7e11e0f..1398437 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -49,6 +49,10 @@ def test_auto_shorthelp(runner):
"""This is a short text."""
@cli.command()
+ def special_chars():
+ """Login and store the token in ~/.netrc."""
+
+ @cli.command()
def long():
"""This is a long text that is too long to show as short help
and will be truncated instead."""
@@ -57,7 +61,9 @@ def test_auto_shorthelp(runner):
assert re.search(
r'Commands:\n\s+'
r'long\s+This is a long text that is too long to show\.\.\.\n\s+'
- r'short\s+This is a short text\.', result.output) is not None
+ r'short\s+This is a short text\.\n\s+'
+ r'special_chars\s+Login and store the token in ~/.netrc\.\s*',
+ result.output) is not None
def test_default_maps(runner):