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;
66 private final static int UNEXPECTED_PATHS = 3;
67 private final static int AVAILABLE_LOCALES = 4;
68 private final static int ERROR_MESSAGE = 5;
69
70 private static int errors;
71
72 private final static Object[][] testData = {
73 // Test data should include:
74 // - --include-locales command line option
75 // - --add-modules command line option values
76 // - List of required resources in the result image
77 // - List of resources that should not exist in the result image
|
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"
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/timeout=300 -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;
67 private final static int UNEXPECTED_PATHS = 3;
68 private final static int AVAILABLE_LOCALES = 4;
69 private final static int ERROR_MESSAGE = 5;
70
71 private static int errors;
72
73 private final static Object[][] testData = {
74 // Test data should include:
75 // - --include-locales command line option
76 // - --add-modules command line option values
77 // - List of required resources in the result image
78 // - List of resources that should not exist in the result image
|