8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @requires !vm.graal.enabled
27 * @modules jdk.jdeps jdk.zipfs
28 * @library /lib/testlibrary
29 * @build ShowModuleResolutionTest jdk.testlibrary.*
30 * @run testng ShowModuleResolutionTest
31 * @summary Basic test for java --show-module-resolution
32 */
33
34 import jdk.testlibrary.ProcessTools;
35
36 import org.testng.annotations.Test;
37 import static org.testng.Assert.*;
38
39 @Test
40 public class ShowModuleResolutionTest {
41
42 /**
43 * Test that the resolution does not bind any services
44 */
45 private void expectJavaBase(String... args) throws Exception {
46 int exitValue = ProcessTools.executeTestJava(args)
47 .outputTo(System.out)
48 .errorTo(System.out)
49 .stdoutShouldContain("root java.base")
50 .stdoutShouldNotContain("java.base binds")
51 .getExitValue();
52 assertTrue(exitValue == 0);
53 }
54
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @requires !vm.graal.enabled
27 * @modules jdk.jdeps jdk.zipfs
28 * @library /test/lib
29 * @build ShowModuleResolutionTest
30 * @run testng ShowModuleResolutionTest
31 * @summary Basic test for java --show-module-resolution
32 */
33
34 import jdk.test.lib.process.ProcessTools;
35
36 import org.testng.annotations.Test;
37 import static org.testng.Assert.*;
38
39 @Test
40 public class ShowModuleResolutionTest {
41
42 /**
43 * Test that the resolution does not bind any services
44 */
45 private void expectJavaBase(String... args) throws Exception {
46 int exitValue = ProcessTools.executeTestJava(args)
47 .outputTo(System.out)
48 .errorTo(System.out)
49 .stdoutShouldContain("root java.base")
50 .stdoutShouldNotContain("java.base binds")
51 .getExitValue();
52 assertTrue(exitValue == 0);
53 }
54
|