jdk/test/tools/launcher/modules/listmods/ListModsTest.java
author mchung
Wed, 14 Dec 2016 10:51:13 -0800
changeset 42693 6645de32a866
parent 42338 a60f280f803c
child 43503 bc7f8619ab70
permissions -rw-r--r--
8171201: Drop java.compact$N aggregator modules 8171202: Rename jdk.crypto.pkcs11 and jdk.pack200 to end with Java letters Reviewed-by: alanb, erikj
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     1
/*
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     2
 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     4
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     8
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    13
 * accompanied this code).
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    14
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    18
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    21
 * questions.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    22
 */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    23
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    24
/**
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    25
 * @test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    26
 * @library /lib/testlibrary
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    27
 * @modules java.se
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    28
 * @build ListModsTest CompilerUtils jdk.testlibrary.*
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    29
 * @run testng ListModsTest
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
    30
 * @summary Basic test for java --list-modules
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    31
 */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    32
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    33
import java.nio.file.Path;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    34
import java.nio.file.Paths;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    35
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    36
import static jdk.testlibrary.ProcessTools.*;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    37
import jdk.testlibrary.OutputAnalyzer;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    38
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    39
import org.testng.annotations.BeforeTest;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    40
import org.testng.annotations.Test;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    41
import static org.testng.Assert.*;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    42
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    43
/**
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
    44
 * Basic tests for java --list-modules
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    45
 */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    46
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    47
public class ListModsTest {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    48
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    49
    private static final String TEST_SRC = System.getProperty("test.src");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    50
    private static final Path SRC_DIR = Paths.get(TEST_SRC, "src");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    51
    private static final Path MODS_DIR = Paths.get("mods");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    52
    private static final Path UPGRADEMODS_DIR = Paths.get("upgrademods");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    53
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    54
    @BeforeTest
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    55
    public void setup() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    56
        boolean compiled;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    57
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
    58
        // javac -d mods/m1 --module-path mods src/m1/**
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    59
        compiled = CompilerUtils.compile(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    60
                SRC_DIR.resolve("m1"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    61
                MODS_DIR.resolve("m1"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    62
        assertTrue(compiled);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    63
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
    64
        // javac -d upgrademods/java.transaction --module-path mods src/java.transaction/**
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    65
        compiled = CompilerUtils.compile(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    66
                SRC_DIR.resolve("java.transaction"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    67
                UPGRADEMODS_DIR.resolve("java.transaction"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    68
        assertTrue(compiled);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    69
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    70
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    71
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    72
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    73
    @Test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    74
    public void testListAll() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    75
        OutputAnalyzer output
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
    76
            = executeTestJava("--list-modules")
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    77
                .outputTo(System.out)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    78
                .errorTo(System.out);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    79
        output.shouldContain("java.base");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    80
        output.shouldContain("java.xml");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    81
        assertTrue(output.getExitValue() == 0);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    82
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    83
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    84
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    85
    @Test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    86
    public void testListOneModule() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    87
        OutputAnalyzer output
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
    88
            = executeTestJava("--list-modules=java.base")
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    89
                .outputTo(System.out)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    90
                .errorTo(System.out);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    91
        output.shouldContain("java.base");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    92
        output.shouldContain("exports java.lang");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    93
        assertTrue(output.getExitValue() == 0);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    94
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    95
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    96
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    97
    @Test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    98
    public void testListTwoModules() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    99
        OutputAnalyzer output
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
   100
            = executeTestJava("--list-modules", "java.base,java.xml")
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   101
                .outputTo(System.out)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   102
                .errorTo(System.out);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   103
        output.shouldContain("java.base");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   104
        output.shouldContain("exports java.lang");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   105
        output.shouldContain("java.xml");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   106
        output.shouldContain("exports javax.xml");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   107
        assertTrue(output.getExitValue() == 0);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   108
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   109
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   110
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   111
    @Test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   112
    public void testListUnknownModule() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   113
        OutputAnalyzer output
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
   114
            = executeTestJava("--list-modules", "java.rhubarb")
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   115
                .outputTo(System.out)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   116
                .errorTo(System.out);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   117
        output.shouldNotContain("java.base");
42338
a60f280f803c 8169069: Module system implementation refresh (11/2016)
alanb
parents: 40261
diff changeset
   118
        output.shouldContain("java.rhubarb not observable");
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   119
        assertTrue(output.getExitValue() == 0);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   120
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   121
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   122
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   123
    @Test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   124
    public void testListWithModulePath() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   125
        OutputAnalyzer output
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
   126
            = executeTestJava("--module-path", MODS_DIR.toString(), "--list-modules")
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   127
                .outputTo(System.out)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   128
                .errorTo(System.out);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   129
        output.shouldContain("java.base");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   130
        output.shouldContain("m1");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   131
        assertTrue(output.getExitValue() == 0);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   132
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   133
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   134
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   135
    @Test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   136
    public void testListWithUpgradeModulePath() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   137
        OutputAnalyzer output
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
   138
            = executeTestJava("--upgrade-module-path", UPGRADEMODS_DIR.toString(),
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
   139
                              "--list-modules", "java.transaction")
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   140
                .outputTo(System.out)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   141
                .errorTo(System.out);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   142
        output.shouldContain("exports javax.transaction.atomic");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   143
        assertTrue(output.getExitValue() == 0);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   144
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   145
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   146
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   147
    @Test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   148
    public void testListWithLimitMods1() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   149
        OutputAnalyzer output
42693
6645de32a866 8171201: Drop java.compact$N aggregator modules
mchung
parents: 42338
diff changeset
   150
            = executeTestJava("--limit-modules", "java.management", "--list-modules")
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   151
                .outputTo(System.out)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   152
                .errorTo(System.out);
42693
6645de32a866 8171201: Drop java.compact$N aggregator modules
mchung
parents: 42338
diff changeset
   153
        output.shouldContain("java.rmi");
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   154
        output.shouldContain("java.base");
42693
6645de32a866 8171201: Drop java.compact$N aggregator modules
mchung
parents: 42338
diff changeset
   155
        output.shouldNotContain("java.scripting");
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   156
        assertTrue(output.getExitValue() == 0);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   157
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   158
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   159
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   160
    @Test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   161
    public void testListWithLimitMods2() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   162
        OutputAnalyzer output
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
   163
            = executeTestJava("--module-path", MODS_DIR.toString(),
42693
6645de32a866 8171201: Drop java.compact$N aggregator modules
mchung
parents: 42338
diff changeset
   164
                              "--limit-modules", "java.management",
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
   165
                              "--list-modules")
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   166
                .outputTo(System.out)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   167
                .errorTo(System.out);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   168
        output.shouldContain("java.base");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   169
        output.shouldNotContain("m1");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   170
        assertTrue(output.getExitValue() == 0);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   171
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   172
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   173
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   174
    /**
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
   175
     * java -version --list-modules => should print version and exit
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   176
     */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   177
    @Test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   178
    public void testListWithPrintVersion1() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   179
        OutputAnalyzer output
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
   180
            = executeTestJava("-version", "--list-modules")
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   181
                .outputTo(System.out)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   182
                .errorTo(System.out);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   183
        output.shouldNotContain("java.base");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   184
        output.shouldContain("Runtime Environment");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   185
        assertTrue(output.getExitValue() == 0);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   186
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   187
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   188
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   189
    /**
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
   190
     * java --list-modules -version => should list modules and exit
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   191
     */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   192
    @Test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   193
    public void testListWithPrintVersion2() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   194
        OutputAnalyzer output
40261
86a49ba76f52 8136930: Simplify use of module-system options by custom launchers
mchung
parents: 36511
diff changeset
   195
            = executeTestJava("--list-modules", "-version")
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   196
                .outputTo(System.out)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   197
                .errorTo(System.out);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   198
        output.shouldContain("java.base");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   199
        output.shouldNotContain("Runtime Environment");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   200
        assertTrue(output.getExitValue() == 0);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   201
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   202
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   203
}