Skip to content

Commit

Permalink
fix test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
heuermh authored and remkop committed Feb 15, 2022
1 parent 9d3d749 commit 6b2c37d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ println "done"
" -h, --help Show this help message and exit.%n" +
" -V, --version Print version information and exit.%n" +
"Commands:%n" +
" help Displays help information about the specified command%n" +
" help Display help information about the specified command.%n" +
" commit Record changes to the repository"
assertEquals(String.format(expected), baos.toString().trim())
assertEquals(null, result)
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/picocli/AutoCompleteTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,7 @@ public void run() { }
" --apples=<apples>%n" +
" --bbb=<b>%n" +
"Commands:%n" +
" help Displays help information about the specified command%n");
" help Display help information about the specified command.%n");
assertEquals(expectedUsage, cmd.getUsageMessage(CommandLine.Help.Ansi.OFF));

StringWriter sw = new StringWriter();
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/picocli/Demo.java
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ public void testUsageMainCommand() {
"Commands:%n" +
"%n" +
"The most commonly used git commands are:%n" +
" help Displays help information about the specified command%n" +
" help Display help information about the specified command.%n" +
" status Show the working tree status.%n" +
" commit Record changes to the repository.%n" +
" add Add file contents to the index.%n" +
Expand All @@ -510,7 +510,7 @@ public void testUsageMainCommand() {
"Commands:%n" +
"%n" +
"The most commonly used git commands are:%n" +
" \u001B[1mhelp\u001B[21m\u001B[0m Displays help information about the specified command%n" +
" \u001B[1mhelp\u001B[21m\u001B[0m Display help information about the specified command.%n" +
" \u001B[1mstatus\u001B[21m\u001B[0m Show the working tree status.%n" +
" \u001B[1mcommit\u001B[21m\u001B[0m Record changes to the repository.%n" +
" \u001B[1madd\u001B[21m\u001B[0m Add file contents to the index.%n" +
Expand Down
12 changes: 6 additions & 6 deletions src/test/java/picocli/HelpSubCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class App implements Runnable{ public void run(){}}
" -V, --version Print version information and exit.%n" +
"Commands:%n" +
" sub This is a subcommand%n" +
" help Displays help information about the specified command%n");
" help Display help information about the specified command.%n");
assertEquals(expected, sw.toString());
}

Expand All @@ -328,7 +328,7 @@ class App implements Runnable{ public void run(){}}
" -V, --version Print version information and exit.%n" +
"Commands:%n" +
" sub This is a subcommand%n" +
" help Displays help information about the specified command%n");
" help Display help information about the specified command.%n");
assertEquals(expected, sw.toString());
}

Expand All @@ -344,7 +344,7 @@ class App implements Runnable{ public void run(){}}
.execute("help", "-h");

String expected = String.format("" +
"Displays help information about the specified command%n" +
"Display help information about the specified command.%n" +
"%n" +
"Usage: <main class> help [-h] [COMMAND]%n" +
"%n" +
Expand Down Expand Up @@ -377,7 +377,7 @@ class App implements Runnable{ public void run(){}}
" -V, --version Print version information and exit.%n" +
"Commands:%n" +
" sub This is a subcommand%n" +
" help Displays help information about the specified command%n");
" help Display help information about the specified command.%n");
assertEquals(expected, sw.toString());

sw = new StringWriter();
Expand Down Expand Up @@ -408,7 +408,7 @@ public void testHelpSubcommandRunPrintsParentUsageIfParentSet() {
"Usage: parent [COMMAND]%n" +
"the parent command%n" +
"Commands:%n" +
" parent Displays help information about the specified command%n");
" parent Display help information about the specified command.%n");
assertEquals(expected, this.systemOutRule.getLog());
}

Expand All @@ -427,7 +427,7 @@ public void testHelpSubcommand2RunPrintsParentUsageIfParentSet() {
"Usage: parent [COMMAND]%n" +
"the parent command%n" +
"Commands:%n" +
" parent Displays help information about the specified command%n");
" parent Display help information about the specified command.%n");
assertEquals(expected, this.systemOutRule.getLog());
}

Expand Down
6 changes: 3 additions & 3 deletions src/test/java/picocli/HelpTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3295,7 +3295,7 @@ public void testAutoHelpMixinUsageHelpSubcommandOnAppWithoutSubcommands() {
" -h, --help Show this help message and exit.%n" +
" -V, --version Print version information and exit.%n" +
"Commands:%n" +
" help Displays help information about the specified command%n");
" help Display help information about the specified command.%n");
assertEquals(expected, baos.toString());
}

Expand All @@ -3315,7 +3315,7 @@ class App implements Runnable{ public void run(){}}
" -h, --help Show this help message and exit.%n" +
" -V, --version Print version information and exit.%n" +
"Commands:%n" +
" help Displays help information about the specified command%n");
" help Display help information about the specified command.%n");
assertEquals(expected, sw.toString());
}

Expand Down Expand Up @@ -5118,7 +5118,7 @@ class MyTool {
String expected = String.format("" +
"Usage: <main class> [COMMAND]%n" +
"Commands:%n" +
" help Displays help information about the specified command%n");
" help Display help information about the specified command.%n");
String actual = new CommandLine(new MyTool()).getUsageMessage();
assertEquals(expected, actual);
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/picocli/InterpolatedModelTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class App {
"OPTION HEADING%n" +
" -x+ <x> option description%n" +
"SUBCOMMANDS HEADING%n" +
" help Displays help information about the specified command%n" +
" help Display help information about the specified command.%n" +
"FOOTER HEADING%n" +
"FOOTER 1%n" +
"and FOOTER 2%n");
Expand Down Expand Up @@ -138,7 +138,7 @@ class App {
"OPTION HEADING%n" +
" -x+ <x> option description%n" +
"SUBCOMMANDS HEADING%n" +
" help Displays help information about the specified command%n" +
" help Display help information about the specified command.%n" +
"FOOTER HEADING%n" +
"FOOTER 1%n" +
"and FOOTER 2%n");
Expand Down

0 comments on commit 6b2c37d

Please sign in to comment.