6990390: javah -help produces help screen with extraneous output
authorjjg
Mon, 11 Oct 2010 10:19:57 -0700
changeset 6927 5bc46d9ca5b9
parent 6926 f0beafc94c59
child 6928 b261e884b833
6990390: javah -help produces help screen with extraneous output Reviewed-by: darcy
langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties
langtools/test/tools/javah/TestHelpOpts.java
--- a/langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties	Thu Oct 07 15:26:32 2010 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties	Mon Oct 11 10:19:57 2010 -0700
@@ -94,7 +94,7 @@
 \  -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
--- a/langtools/test/tools/javah/TestHelpOpts.java	Thu Oct 07 15:26:32 2010 -0700
+++ b/langtools/test/tools/javah/TestHelpOpts.java	Mon Oct 11 10:19:57 2010 -0700
@@ -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 @@
         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) {