--- old/test/runtime/modules/ModuleOptionsTest.java 2016-09-08 09:10:26.899037614 -0400 +++ new/test/runtime/modules/ModuleOptionsTest.java 2016-09-08 09:10:25.305244620 -0400 @@ -38,14 +38,16 @@ public static void main(String[] args) throws Exception { - // Test that last --add-modules is the only one recognized. No exception - // should be thrown. + // Test that multiple --add-modules options are cumulative, not last one wins. + // An exception should be thrown because module i_dont_exist doesn't exist. ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( "--add-modules=i_dont_exist", "--add-modules=java.base", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldHaveExitValue(0); + output.shouldContain("ResolutionException"); + output.shouldContain("i_dont_exist"); + output.shouldHaveExitValue(1); - // Test that last --limit-modules is the only one recognized. No exception + // Test that the last --limit-modules is the only one recognized. No exception // should be thrown. pb = ProcessTools.createJavaProcessBuilder( "--limit-modules=i_dont_exist", "--limit-modules=java.base", "-version");