diff options
author | srafi1 <shakilrafi0@gmail.com> | 2020-10-22 19:28:14 -0400 |
---|---|---|
committer | Amy <leiamy12@gmail.com> | 2020-10-30 15:09:25 -0400 |
commit | 17a82fc9255ed52f42bb84d9a6649780d8438bdc (patch) | |
tree | 8d2795617c82649ea7835bfa9b2633e95a673d13 /tests/test_basic.py | |
parent | 801a29f1a85db0845d1277d8e031800b003eff61 (diff) | |
download | click-17a82fc9255ed52f42bb84d9a6649780d8438bdc.tar.gz |
account for linebreak in help summary
Diffstat (limited to 'tests/test_basic.py')
-rw-r--r-- | tests/test_basic.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_basic.py b/tests/test_basic.py index de9b0ac..4735627 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -528,3 +528,22 @@ def test_hidden_group(runner): assert result.exit_code == 0 assert "subgroup" not in result.output assert "nope" not in result.output + + +def test_summary_line(runner): + @click.group() + def cli(): + pass + + @cli.command() + def cmd(): + """ + Summary line without period + + Here is a sentence. And here too. + """ + pass + + result = runner.invoke(cli, ["--help"]) + assert "Summary line without period" in result.output + assert "Here is a sentence." not in result.output |