< prev index next >

test/jdk/tools/jmod/hashes/HashesTest.java

Print this page

        

*** 235,244 **** --- 235,266 ---- Stream.concat(jars.stream(), jmods.stream()) .filter(mn -> !mn.equals("j1") && !mn.equals("j2")) .forEach(mn -> assertTrue(ht.hashes(mn) == null)); } + @Test + public static void upgradeableModule() throws IOException { + Path mpath = Paths.get(System.getProperty("java.home"), "jmods"); + if (!Files.exists(mpath)) { + return; + } + + Path dest = Paths.get("test4"); + HashesTest ht = new HashesTest(dest); + ht.makeModule("m1"); + ht.makeModule("java.compiler", "m1"); + ht.makeModule("m2", "java.compiler"); + + ht.makeJmod("m1"); + ht.makeJmod("m2"); + ht.makeJmod("java.compiler", + "--module-path", + ht.lib.toString() + File.pathSeparator + mpath, + "--hash-modules", "java\\.(?!se)|^m.*"); + + ht.checkHashes("java.compiler", "m2"); + } @Test public static void testImageJmods() throws IOException { Path mpath = Paths.get(System.getProperty("java.home"), "jmods"); if (!Files.exists(mpath)) {
< prev index next >