6990390: javah -help produces help screen with extraneous output

Reviewed-by: darcy
This commit is contained in:
Jonathan Gibbons 2010-10-11 10:19:57 -07:00
parent 1da6aa89d2
commit 0b7ceb0204
2 changed files with 4 additions and 2 deletions

View File

@ -94,7 +94,7 @@ main.opt.d=\
\ -d <dir> Output directory
main.opt.v=\
\ -v -verbose Enable verbose output
main.opt.help=\
main.opt.h=\
\ -h --help -? Print this message
main.opt.version=\
\ -version Print version information

View File

@ -23,7 +23,7 @@
/*
* @test
* @bug 6893932
* @bug 6893932 6990390
* @summary javah help screen lists -h and -? but does not accept them
*/
@ -68,6 +68,8 @@ public class TestHelpOpts {
String flat = out.replaceAll("\\s+", " "); // canonicalize whitespace
if (!flat.contains("Usage: javah [options] <classes> where [options] include:"))
error("expected text not found");
if (flat.contains("main.opt"))
error("key not found in resource bundle: " + flat.replaceAll(".*(main.opt.[^ ]*).*", "$1"));
}
void error(String msg) {