langtools/test/jdk/jshell/ToolSimpleTest.java
changeset 43038 7b8b8750a78e
parent 42972 47ca49eee534
child 43274 6b5ed4f9fb81
equal deleted inserted replaced
43037:3e1520a857fa 43038:7b8b8750a78e
    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
    26  * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103  8165405
    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
   194                 "|  Type /help for help."));
   194                 "|  Type /help for help."));
   195     }
   195     }
   196 
   196 
   197     @Test
   197     @Test
   198     public void testEmptyClassPath() {
   198     public void testEmptyClassPath() {
   199         test(after -> assertCommand(after, "/classpath", "|  The /classpath command requires a path argument."));
   199         test(after -> assertCommand(after, "/env --class-path", "|  Argument to class-path missing."));
   200     }
   200     }
   201 
   201 
   202     @Test
   202     @Test
   203     public void testNoArgument() {
   203     public void testNoArgument() {
   204         test(
   204         test(
   604                         "$1 ==> \"blorp\"")
   604                         "$1 ==> \"blorp\"")
   605         );
   605         );
   606     }
   606     }
   607 
   607 
   608     @Test
   608     @Test
       
   609     public void testWrapSourceHandlerDiagCrash() {
       
   610         test(new String[]{"--add-exports", "jdk.javadoc/ALL-UNNAMED"},
       
   611                 (a) -> assertCommand(a, "1+1", "$1 ==> 2")
       
   612          );
       
   613     }
       
   614 
       
   615     @Test
   609     public void test8156910() {
   616     public void test8156910() {
   610         test(
   617         test(
   611                 (a) -> assertCommandOutputContains(a, "System.out.println(\"%5d\", 10);", "%5d"),
   618                 (a) -> assertCommandOutputContains(a, "System.out.println(\"%5d\", 10);", "%5d"),
   612                 (a) -> assertCommandOutputContains(a, "1234", "==> 1234")
   619                 (a) -> assertCommandOutputContains(a, "1234", "==> 1234")
   613         );
   620         );