test/jdk/jshell/ToolReloadTest.java

Print this page

        

@@ -88,11 +88,11 @@
                 (a) -> evaluateExpression(a, "pkg.A", "new pkg.A();", "Aprime")
         );
     }
 
     public void testReloadDrop() {
-        test(false, new String[]{"-nostartup"},
+        test(false, new String[]{"--no-startup"},
                 a -> assertVariable(a, "int", "a"),
                 a -> dropVariable(a, "/dr 1", "int a = 0", "|  dropped variable a"),
                 a -> assertMethod(a, "int b() { return 0; }", "()I", "b"),
                 a -> dropMethod(a, "/drop b", "b ()I", "|  dropped method b()"),
                 a -> assertClass(a, "class A {}", "class", "A"),

@@ -111,11 +111,11 @@
                 a -> assertCommandCheckOutput(a, "/imports", assertImports())
         );
     }
 
     public void testReloadQuiet() {
-        test(false, new String[]{"-nostartup"},
+        test(false, new String[]{"--no-startup"},
                 a -> assertVariable(a, "int", "a"),
                 a -> dropVariable(a, "/dr 1", "int a = 0", "|  dropped variable a"),
                 a -> assertMethod(a, "int b() { return 0; }", "()I", "b"),
                 a -> dropMethod(a, "/drop b", "b ()I", "|  dropped method b()"),
                 a -> assertClass(a, "class A {}", "class", "A"),

@@ -128,11 +128,11 @@
                 a -> assertCommandCheckOutput(a, "/imports", assertImports())
         );
     }
 
     public void testReloadRepeat() {
-        test(false, new String[]{"-nostartup"},
+        test(false, new String[]{"--no-startup"},
                 (a) -> assertVariable(a, "int", "c", "7", "7"),
                 (a) -> assertCommand(a, "++c", null),
                 (a) -> assertCommand(a, "/!", null),
                 (a) -> assertCommand(a, "/2", null),
                 (a) -> assertCommand(a, "/-1", null),

@@ -148,11 +148,11 @@
                 (a) -> assertCommand(a, "$4", "$4 ==> 10")
         );
     }
 
     public void testReloadIgnore() {
-        test(false, new String[]{"-nostartup"},
+        test(false, new String[]{"--no-startup"},
                 (a) -> assertCommand(a, "(-)", null),
                 (a) -> assertCommand(a, "/list", null),
                 (a) -> assertCommand(a, "/history", null),
                 (a) -> assertCommand(a, "/help", null),
                 (a) -> assertCommand(a, "/vars", null),

@@ -199,17 +199,17 @@
                 (a) -> assertCommandCheckOutput(a, "/methods", assertMethods())
         );
     }
 
     public void testReloadExitRestore() {
-        test(false, new String[]{"-nostartup"},
+        test(false, new String[]{"--no-startup"},
                 (a) -> assertVariable(a, "int", "x", "5", "5"),
                 (a) -> assertMethod(a, "int m(int z) { return z * z; }",
                         "(int)int", "m"),
                 (a) -> evaluateExpression(a, "int", "m(x)", "25")
         );
-        test(false, new String[]{"-nostartup"},
+        test(false, new String[]{"--no-startup"},
                 (a) -> assertCommand(a, "/reload -restore",
                         "|  Restarting and restoring from previous state.\n" +
                         "-: int x = 5;\n" +
                         "-: int m(int z) { return z * z; }\n" +
                         "-: m(x)\n"),