[MPLUGIN-262] prepare more precise checks of help output

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1590389 13f79535-47bb-0310-9956-ffa450edef68
master
Herve Boutemy 2014-04-27 13:17:05 +00:00
parent 166e0f7215
commit a28ba3d065
2 changed files with 26 additions and 4 deletions

View File

@ -0,0 +1,20 @@
[INFO] help 1.0-SNAPSHOT
Tests generation and compilation of the help mojo.
help:test
MOJO-DESCRIPTION. Some 'quotation' marks and backslashes '\\', some important
javadoc
and an inline link to AnotherMojo.
Available parameters:
defaultParam
This parameter uses 'quotation' marks and backslashes '\\' in its
description. Those characters must be escaped in Java string literals.
deprecatedParam
This parameter is deprecated.
undocumentedParam
Required: Yes

View File

@ -17,10 +17,12 @@
* under the License.
*/
log = new File( basedir, "help.log" ).text;
log = log.substring( log.indexOf( "[INFO] help 1.0-SNAPSHOT" ) )
log = log.substring( 0, log.indexOf( "[INFO]", 5 ) )
expected = new File( basedir, "expected-help.txt" ).text.trim();
println "$log";
log = new File( basedir, "help.log" ).text;
log = log.substring( log.indexOf( "[INFO] help 1.0-SNAPSHOT" ) );
log = log.substring( 0, log.indexOf( "[INFO]", 5 ) ).trim();
assert log == expected;
return true;