@@ -69,19 +69,23 @@ void testInfoOpt(String opt, String... expect) {
6969
7070 @ Test
7171 void testUniqueInfoOpts () throws IOException {
72- testUniqueInfoOpt (new String [] {"--help" , "--help" } , "possible options" );
73- testUniqueInfoOpt (new String [] {"-X" , "-X" } , "extra options" );
74- testUniqueInfoOpt (new String [] {"--help-lint" , "--help-lint" } , "supported keys" );
72+ testUniqueInfoOpt (new String [] {"--help" }, new String [] { "--help" , "--help" } );
73+ testUniqueInfoOpt (new String [] {"-X" }, new String [] { "-X" , "-X" } );
74+ testUniqueInfoOpt (new String [] {"--help-lint" }, new String [] { "--help-lint" , "--help-lint" } );
7575
76- String specVersion = System .getProperty ("java.specification.version" );
77- testUniqueInfoOpt (new String [] {"-version" , "-version" }, "javac" , specVersion );
78- testUniqueInfoOpt (new String [] {"-fullversion" , "-fullversion" }, "javac" , specVersion );
76+ testUniqueInfoOpt (new String [] {"-version" }, new String [] {"-version" , "-version" });
77+ testUniqueInfoOpt (new String [] {"-fullversion" }, new String [] {"-fullversion" , "-fullversion" });
7978 }
8079
81- void testUniqueInfoOpt (String [] opts , String ... expect ) {
80+ void testUniqueInfoOpt (String [] baseOpts , String [] testOpts ) {
8281 String [] files = { };
83- runMain (opts , files )
84- .checkOK ()
85- .checkUniqueLog (expect );
82+
83+ TestResult base = runMain (baseOpts , files )
84+ .checkOK ();
85+
86+ TestResult test = runMain (testOpts , files )
87+ .checkOK ();
88+
89+ base .checkSameLog (test );
8690 }
8791}
0 commit comments