Skip to content

Commit

Permalink
Add proper documentation for the "dub test" command. Fixes #83.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Feb 10, 2014
1 parent e55f743 commit 33d4942
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions source/dub/commandline.d
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,23 @@ class TestCommand : PackageBuildCommand {
this.argumentsPattern = "[<package>]";
this.description = "Executes the tests of the selected package";
this.helpText = [
"Builds a library configuration of the selected package and executes all contained unit tests."
`Builds the package and executes all contained unit tests.`,
``,
`If no explicit configuration is given, an existing "unittest" ` ~
`configuration will be preferred for testing. If none exists, the ` ~
`first library type configuration will be used, and if that doesn't ` ~
`exist either, the first executable configuration is chosen.`,
``,
`When a custom main file (--main-file) is specified, only library ` ~
`configurations can be used. Otherwise, depending on the type of ` ~
`the selected configuration, either an existing main file will be ` ~
`used (and needs to be properly adjusted to just run the unit ` ~
`tests for 'version(unittest)'), or DUB will generate one for ` ~
`library type configurations.`,
``,
`Finally, if the package contains a dependency to the "tested" ` ~
`package, the automatically generated main file will use it to ` ~
`run the unit tests.`
];
this.acceptsAppArgs = true;
}
Expand Down Expand Up @@ -933,7 +949,7 @@ private {
enum shortArgColumn = 2;
enum longArgColumn = 6;
enum descColumn = 24;
enum lineWidth = 80;
enum lineWidth = 80 - 1;
}

private void showHelp(in CommandGroup[] commands, CommandArgs common_args)
Expand Down

0 comments on commit 33d4942

Please sign in to comment.