< prev index next >

test/langtools/tools/javac/launcher/SourceLauncherTest.java

Print this page
@@ -668,10 +668,11 @@
      @Test
      public void testNoOptionsWarnings(Path base) throws IOException {
          tb.writeJavaFiles(base, "public class Main { public static void main(String... args) {}}");
          String log = new JavaTask(tb)
                  .vmOptions("--source", "21")
+                 .includeStandardOptions(false) // Do not inherit --enable-preview
                  .className(base.resolve("Main.java").toString())
                  .run(Task.Expect.SUCCESS)
                  .getOutput(Task.OutputKind.STDERR);
  
          if (log.contains("warning: [options]")) {
< prev index next >