langtools/test/jdk/jshell/ToolSimpleTest.java
changeset 43274 6b5ed4f9fb81
parent 43038 7b8b8750a78e
child 43586 cc7a4eb79b29
equal deleted inserted replaced
43273:2614e1907a0b 43274:6b5ed4f9fb81
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103  8165405
    26  * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103  8165405 8173073
    27  * @summary Simple jshell tool tests
    27  * @summary Simple jshell tool tests
    28  * @modules jdk.compiler/com.sun.tools.javac.api
    28  * @modules jdk.compiler/com.sun.tools.javac.api
    29  *          jdk.compiler/com.sun.tools.javac.main
    29  *          jdk.compiler/com.sun.tools.javac.main
    30  *          jdk.jdeps/com.sun.tools.javap
    30  *          jdk.jdeps/com.sun.tools.javap
    31  *          jdk.jshell/jdk.internal.jshell.tool
    31  *          jdk.jshell/jdk.internal.jshell.tool
   494                         s -> checkLineToList(s, startTypeList))
   494                         s -> checkLineToList(s, startTypeList))
   495         );
   495         );
   496     }
   496     }
   497 
   497 
   498     @Test
   498     @Test
       
   499     public void testBlankLinesInSnippetContinuation() {
       
   500         test(Locale.ROOT, false, new String[]{"--no-startup"}, "",
       
   501                 a -> assertCommand(a, "class C {",
       
   502                         ""),
       
   503                 a -> assertCommand(a, "",
       
   504                         ""),
       
   505                 a -> assertCommand(a, "",
       
   506                         ""),
       
   507                 a -> assertCommand(a, "  int x;",
       
   508                         ""),
       
   509                 a -> assertCommand(a, "",
       
   510                         ""),
       
   511                 a -> assertCommand(a, "",
       
   512                         ""),
       
   513                 a -> assertCommand(a, "}",
       
   514                         "|  created class C"),
       
   515                 a -> assertCommand(a, "/list",
       
   516                         "\n" +
       
   517                         "   1 : class C {\n" +
       
   518                         "       \n" +
       
   519                         "       \n" +
       
   520                         "         int x;\n" +
       
   521                         "       \n" +
       
   522                         "       \n" +
       
   523                         "       }")
       
   524         );
       
   525     }
       
   526 
       
   527     @Test
   499     public void testCompoundStart() {
   528     public void testCompoundStart() {
   500         test(new String[]{"--startup", "DEFAULT", "--startup", "PRINTING"},
   529         test(new String[]{"--startup", "DEFAULT", "--startup", "PRINTING"},
   501                 (a) -> assertCommand(a, "printf(\"%4.2f\", Math.PI)",
   530                 (a) -> assertCommand(a, "printf(\"%4.2f\", Math.PI)",
   502                         "", "", null, "3.14", "")
   531                         "", "", null, "3.14", "")
   503         );
   532         );