diff options
author | David Lord <davidism@gmail.com> | 2022-02-21 10:04:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 10:04:40 -0800 |
commit | c01e2b8ed17d3ea65981bc62784363d0e38e3092 (patch) | |
tree | c4c10a7f1c3a08e6e41c2d9ee21a26769cc65372 /tests | |
parent | 4262661a0fffabe3803f1bd876b19244f587dafa (diff) | |
parent | 92b30e47cb013433190f40d75239c98c77aa9d2d (diff) | |
download | click-c01e2b8ed17d3ea65981bc62784363d0e38e3092.tar.gz |
Merge pull request #2151 from stephenfin/store-untruncated-help
Store raw help string for commands
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_commands.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py index fa2773d..bf6a5db 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -95,6 +95,20 @@ def test_auto_shorthelp(runner): ) +def test_help_truncation(runner): + @click.command() + def cli(): + """This is a command with truncated help. + \f + + This text should be truncated. + """ + + result = runner.invoke(cli, ["--help"]) + assert result.exit_code == 0 + assert "This is a command with truncated help." in result.output + + def test_no_args_is_help(runner): @click.command(no_args_is_help=True) def cli(): |