diff options
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(): |