8213100: fix test OptionSmokeTest before removing it from the problem list
authorvromero
Mon, 29 Oct 2018 17:09:44 -0400
changeset 52323 c306abfeae0d
parent 52322 3d33e20a5794
child 52324 0c5fc2063221
8213100: fix test OptionSmokeTest before removing it from the problem list Reviewed-by: jlahoda
test/langtools/tools/javac/options/smokeTests/OptionSmokeTest.java
--- a/test/langtools/tools/javac/options/smokeTests/OptionSmokeTest.java	Mon Oct 29 14:04:44 2018 -0700
+++ b/test/langtools/tools/javac/options/smokeTests/OptionSmokeTest.java	Mon Oct 29 17:09:44 2018 -0400
@@ -32,9 +32,11 @@
  *          jdk.compiler/com.sun.tools.javac.util
  *          jdk.jdeps/com.sun.tools.javap
  * @build toolbox.ToolBox toolbox.JavacTask toolbox.TestRunner
- * @run main OptionSmokeTest
+ * @run main/othervm OptionSmokeTest
  */
 
+import java.util.Locale;
+
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
@@ -51,6 +53,7 @@
 
     public OptionSmokeTest() {
         super(System.err);
+        Locale.setDefault(Locale.US);
     }
 
     protected void runTests() throws Exception {
@@ -117,7 +120,7 @@
 
     @Test
     public void requiresArg(Path base) throws Exception {
-        doTestNoSource(base, "error: -target requires an argument", "-target");
+        doTestNoSource(base, "error: --target requires an argument", "-target");
     }
 
     @Test
@@ -209,7 +212,7 @@
 
     @Test
     public void optionCantBeUsedWithRelease(Path base) throws Exception {
-        doTestNoSource(base, "error: option -source cannot be used together with --release",
+        doTestNoSource(base, "error: option --source cannot be used together with --release",
                 String.format("--release %s -source %s", Source.DEFAULT.name, Source.DEFAULT.name));
     }
 
@@ -232,9 +235,9 @@
                 String.format("--release %s -endorseddirs any", Source.DEFAULT.name));
         doTestNoSource(base, "error: option -extdirs cannot be used together with --release",
                 String.format("--release %s -extdirs any", Source.DEFAULT.name));
-        doTestNoSource(base, "error: option -source cannot be used together with --release",
+        doTestNoSource(base, "error: option --source cannot be used together with --release",
                 String.format("--release %s -source %s", Source.MIN.name, Source.DEFAULT.name));
-        doTestNoSource(base, "error: option -target cannot be used together with --release",
+        doTestNoSource(base, "error: option --target cannot be used together with --release",
                 String.format("--release %s -target %s", Source.MIN.name, Source.DEFAULT.name));
         doTestNoSource(base, "error: option --system cannot be used together with --release",
                 String.format("--release %s --system none", Source.DEFAULT.name));