jdk/test/tools/jmod/JmodTest.java
changeset 45004 ea3137042a61
parent 43729 21db38703675
child 45286 cd809e28c082
equal deleted inserted replaced
44789:73fd39e0702e 45004:ea3137042a61
   391 
   391 
   392         jmod("describe",
   392         jmod("describe",
   393              MODS_DIR.resolve("describeFoo.jmod").toString())
   393              MODS_DIR.resolve("describeFoo.jmod").toString())
   394              .assertSuccess()
   394              .assertSuccess()
   395              .resultChecker(r -> {
   395              .resultChecker(r -> {
   396                  // Expect similar output: "foo,  requires mandated java.base
   396                  // Expect similar output: "foo... exports jdk.test.foo ...
   397                  // exports jdk.test.foo,  contains jdk.test.foo.internal"
   397                  //   ... requires java.base mandated... contains jdk.test.foo.internal"
   398                  Pattern p = Pattern.compile("\\s+foo\\s+requires\\s+mandated\\s+java.base");
   398                  Pattern p = Pattern.compile("foo\\s+exports\\s+jdk.test.foo");
   399                  assertTrue(p.matcher(r.output).find(),
   399                  assertTrue(p.matcher(r.output).find(),
   400                            "Expecting to find \"foo, requires java.base\"" +
   400                            "Expecting to find \"foo... exports jdk.test.foo\"" +
   401                                 "in output, but did not: [" + r.output + "]");
   401                                 "in output, but did not: [" + r.output + "]");
   402                  p = Pattern.compile(
   402                  p = Pattern.compile(
   403                         "exports\\s+jdk.test.foo\\s+contains\\s+jdk.test.foo.internal");
   403                         "requires\\s+java.base\\s+mandated\\s+contains\\s+jdk.test.foo.internal");
   404                  assertTrue(p.matcher(r.output).find(),
   404                  assertTrue(p.matcher(r.output).find(),
   405                            "Expecting to find \"exports ..., contains ...\"" +
   405                            "Expecting to find \"requires java.base mandated..., " +
       
   406                                 "contains jdk.test.foo.internal ...\"" +
   406                                 "in output, but did not: [" + r.output + "]");
   407                                 "in output, but did not: [" + r.output + "]");
   407              });
   408              });
   408     }
   409     }
   409 
   410 
   410     @Test
   411     @Test