jdk/test/tools/launcher/Arrrghs.java
changeset 12550 482c64a6f825
parent 11822 475ac0b35c06
child 12703 c5ebefaa2f9f
equal deleted inserted replaced
12549:db2c42dabfa4 12550:482c64a6f825
    22  */
    22  */
    23 
    23 
    24 /**
    24 /**
    25  * @test
    25  * @test
    26  * @bug 5030233 6214916 6356475 6571029 6684582 6742159 4459600 6758881 6753938
    26  * @bug 5030233 6214916 6356475 6571029 6684582 6742159 4459600 6758881 6753938
    27  *      6894719 6968053
    27  *      6894719 6968053 7151314
    28  * @summary Argument parsing validation.
    28  * @summary Argument parsing validation.
    29  * @compile -XDignore.symbol.file Arrrghs.java
    29  * @compile -XDignore.symbol.file Arrrghs.java
    30  * @run main Arrrghs
    30  * @run main Arrrghs
    31  */
    31  */
    32 
    32 
   235         // command line,  '% java -Xcomp'
   235         // command line,  '% java -Xcomp'
   236         tr = doExec(javaCmd, "-Xcomp");
   236         tr = doExec(javaCmd, "-Xcomp");
   237         tr.checkNegative();
   237         tr.checkNegative();
   238         tr.isNotZeroOutput();
   238         tr.isNotZeroOutput();
   239         System.out.println(tr);
   239         System.out.println(tr);
       
   240 
       
   241         // 7151314, test for non-negative exit value for an incorrectly formed
       
   242         // command line, '% java -jar -W', note the bogus -W
       
   243         tr = doExec(javaCmd, "-jar", "-W");
       
   244         tr.checkNegative();
       
   245         tr.contains("Unrecognized option: -W");
       
   246         System.out.println(tr);
   240     }
   247     }
   241 
   248 
   242     /*
   249     /*
   243      * Tests various dispositions of the main method, these tests are limited
   250      * Tests various dispositions of the main method, these tests are limited
   244      * to English locales as they check for error messages that are localized.
   251      * to English locales as they check for error messages that are localized.