jdk/test/tools/launcher/modules/limitmods/LimitModsTest.java
changeset 42693 6645de32a866
parent 40261 86a49ba76f52
child 45393 de4e1efc8eec
equal deleted inserted replaced
42692:97247477b481 42693:6645de32a866
    22  */
    22  */
    23 
    23 
    24 /**
    24 /**
    25  * @test
    25  * @test
    26  * @library /lib/testlibrary
    26  * @library /lib/testlibrary
    27  * @modules java.desktop java.compact1 jdk.compiler
    27  * @modules java.desktop java.logging jdk.compiler
    28  * @build LimitModsTest CompilerUtils jdk.testlibrary.*
    28  * @build LimitModsTest CompilerUtils jdk.testlibrary.*
    29  * @run testng LimitModsTest
    29  * @run testng LimitModsTest
    30  * @summary Basic tests for java --limit-modules
    30  * @summary Basic tests for java --limit-modules
    31  */
    31  */
    32 
    32 
    81             .getExitValue();
    81             .getExitValue();
    82 
    82 
    83         assertTrue(exitValue == 0);
    83         assertTrue(exitValue == 0);
    84 
    84 
    85 
    85 
    86         // java --limit-modules java.compact1 --list-modules
    86         // java --limit-modules java.logging --list-modules
    87         exitValue = executeTestJava("--limit-modules", "java.compact1", "--list-modules")
    87         exitValue = executeTestJava("--limit-modules", "java.logging", "--list-modules")
    88             .outputTo(System.out)
    88             .outputTo(System.out)
    89             .errorTo(System.out)
    89             .errorTo(System.out)
    90             .shouldContain("java.base")
    90             .shouldContain("java.base")
    91             .shouldContain("java.logging")
    91             .shouldContain("java.logging")
    92             .shouldContain("java.compact1")
       
    93             .shouldNotContain("java.xml")
    92             .shouldNotContain("java.xml")
    94             .getExitValue();
    93             .getExitValue();
    95 
    94 
    96         assertTrue(exitValue == 0);
    95         assertTrue(exitValue == 0);
    97     }
    96     }