1 /*
2 * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
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 */
26 import java.util.ArrayList;
27 import java.util.List;
28 import java.util.Locale;
29 import java.util.stream.Collectors;
30
31 import jdk.tools.jlink.plugin.Plugin;
32 import jdk.tools.jlink.plugin.PluginException;
33 import jdk.tools.jlink.internal.PluginRepository;
34 import jdk.tools.jlink.internal.TaskHelper;
35 import jdk.tools.jlink.internal.plugins.PluginsResourceBundle;
36 import tests.Helper;
37 import tests.JImageGenerator;
38 import tests.JImageValidator;
39 import tests.Result;
40
41 /*
42 * @test
43 * @bug 8152143 8152704 8155649 8165804 8185841 8176841 8190918
44 * @summary IncludeLocalesPlugin tests
45 * @author Naoto Sato
46 * @library ../../lib
47 * @modules java.base/jdk.internal.jimage
48 * jdk.jdeps/com.sun.tools.classfile
49 * jdk.jlink/jdk.tools.jlink.internal
50 * jdk.jlink/jdk.tools.jlink.internal.plugins
51 * jdk.jlink/jdk.tools.jlink.plugin
52 * jdk.jlink/jdk.tools.jmod
53 * jdk.jlink/jdk.tools.jimage
54 * jdk.compiler
55 * @build tests.*
56 * @build tools.jlink.plugins.GetAvailableLocales
57 * @run main/othervm -Xmx1g IncludeLocalesPluginTest
58 */
59 public class IncludeLocalesPluginTest {
60
61 private final static String moduleName = "IncludeLocalesTest";
62 private static Helper helper;
63 private final static int INCLUDE_LOCALES_OPTION = 0;
64 private final static int ADDMODS_OPTION = 1;
65 private final static int EXPECTED_LOCATIONS = 2;
|
1 /*
2 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
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 */
26 import java.util.ArrayList;
27 import java.util.List;
28 import java.util.Locale;
29 import java.util.stream.Collectors;
30
31 import jdk.tools.jlink.plugin.Plugin;
32 import jdk.tools.jlink.plugin.PluginException;
33 import jdk.tools.jlink.internal.PluginRepository;
34 import jdk.tools.jlink.internal.TaskHelper;
35 import jdk.tools.jlink.internal.plugins.PluginsResourceBundle;
36 import tests.Helper;
37 import tests.JImageGenerator;
38 import tests.JImageValidator;
39 import tests.Result;
40
41 /*
42 * @test
43 * @bug 8152143 8152704 8155649 8165804 8185841 8176841 8190918
44 * @summary IncludeLocalesPlugin tests
45 * @author Naoto Sato
46 * @requires (vm.compMode != "Xcomp" & os.maxMemory >= 2g)
47 * @library ../../lib
48 * @modules java.base/jdk.internal.jimage
49 * jdk.jdeps/com.sun.tools.classfile
50 * jdk.jlink/jdk.tools.jlink.internal
51 * jdk.jlink/jdk.tools.jlink.internal.plugins
52 * jdk.jlink/jdk.tools.jlink.plugin
53 * jdk.jlink/jdk.tools.jmod
54 * jdk.jlink/jdk.tools.jimage
55 * jdk.compiler
56 * @build tests.*
57 * @build tools.jlink.plugins.GetAvailableLocales
58 * @run main/othervm -Xmx1g IncludeLocalesPluginTest
59 */
60 public class IncludeLocalesPluginTest {
61
62 private final static String moduleName = "IncludeLocalesTest";
63 private static Helper helper;
64 private final static int INCLUDE_LOCALES_OPTION = 0;
65 private final static int ADDMODS_OPTION = 1;
66 private final static int EXPECTED_LOCATIONS = 2;
|