hotspot/test/runtime/modules/ModuleOptionsTest.java
changeset 43665 4bb003cad9b9
parent 41073 ed43eecbd166
equal deleted inserted replaced
43606:a5aa7536131c 43665:4bb003cad9b9
    41         // Test that multiple --add-modules options are cumulative, not last one wins.
    41         // Test that multiple --add-modules options are cumulative, not last one wins.
    42         // An exception should be thrown because module i_dont_exist doesn't exist.
    42         // An exception should be thrown because module i_dont_exist doesn't exist.
    43         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
    43         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
    44             "--add-modules=i_dont_exist", "--add-modules=java.base", "-version");
    44             "--add-modules=i_dont_exist", "--add-modules=java.base", "-version");
    45         OutputAnalyzer output = new OutputAnalyzer(pb.start());
    45         OutputAnalyzer output = new OutputAnalyzer(pb.start());
    46         output.shouldContain("ResolutionException");
    46         output.shouldContain("FindException");
    47         output.shouldContain("i_dont_exist");
    47         output.shouldContain("i_dont_exist");
    48         output.shouldHaveExitValue(1);
    48         output.shouldHaveExitValue(1);
    49 
    49 
    50         // Test that the last --limit-modules is the only one recognized.  No exception
    50         // Test that the last --limit-modules is the only one recognized.  No exception
    51         // should be thrown.
    51         // should be thrown.