Skip to content

Commit

Permalink
fixup! Add word-wrap support, with wrap length provided by the user
Browse files Browse the repository at this point in the history
show that user-defined indented lines also work as expected
  • Loading branch information
mostynb committed Nov 7, 2020
1 parent ccda36d commit 4026a0d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion help_test.go
Expand Up @@ -927,9 +927,13 @@ func TestWrappedHelp(t *testing.T) {
Usage: "here's a sample App.Usage string long enough that it should be wrapped in this test",
UsageText: "i'm not sure how App.UsageText differs from App.Usage, but this should also be wrapped in this test",
// TODO: figure out how to make ArgsUsage appear in the help text, and test that
Description: "here's a sample App.Description string long enough that it should be wrapped in this test",
Description: `here's a sample App.Description string long enough that it should be wrapped in this test
with a newline
and an indented line`,
Copyright: `Here's a sample copyright text string long enough that it should be wrapped.
Including newlines.
And also indented lines.
And then another long line. Blah blah blah does anybody ever read these things?`,
Expand Down Expand Up @@ -967,6 +971,9 @@ DESCRIPTION:
App.Description string long
enough that it should be
wrapped in this test
with a newline
and an indented line
GLOBAL OPTIONS:
--foo, -h here's a
Expand All @@ -981,6 +988,7 @@ COPYRIGHT:
text string long enough
that it should be wrapped.
Including newlines.
And also indented lines.
And then another long line.
Expand Down

0 comments on commit 4026a0d

Please sign in to comment.