diff --git a/maven-plugin-plugin/src/it/help-basic/expected-help.txt b/maven-plugin-plugin/src/it/help-basic/expected-help.txt new file mode 100644 index 0000000..de82804 --- /dev/null +++ b/maven-plugin-plugin/src/it/help-basic/expected-help.txt @@ -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 diff --git a/maven-plugin-plugin/src/it/help-basic/verify.groovy b/maven-plugin-plugin/src/it/help-basic/verify.groovy index 635f9a6..9808379 100644 --- a/maven-plugin-plugin/src/it/help-basic/verify.groovy +++ b/maven-plugin-plugin/src/it/help-basic/verify.groovy @@ -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; \ No newline at end of file