--- old/test/tools/launcher/modules/addmods/AddModsTest.java 2016-09-08 12:35:24.000000000 -0700 +++ new/test/tools/launcher/modules/addmods/AddModsTest.java 2016-09-08 12:35:23.000000000 -0700 @@ -31,6 +31,7 @@ * @summary Basic test for java --add-modules */ +import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; @@ -224,6 +225,27 @@ /** + * Tests {@code --add-modules} be specified more than once. + */ + public void testWithMultipleAddModules() throws Exception { + + String modulepath = MODS1_DIR.toString() + File.pathSeparator + + MODS2_DIR.toString(); + int exitValue + = executeTestJava("--module-path", modulepath, + "--add-modules", LOGGER_MODULE, + "--add-modules", TEST_MODULE, + "-m", TEST_MID, + "logger.Logger") + .outputTo(System.out) + .errorTo(System.out) + .getExitValue(); + + assertTrue(exitValue == 0); + } + + + /** * Attempt to run with a bad module name specified to --add-modules */ public void testRunWithBadAddMods() throws Exception {