jdk/test/tools/jlink/plugins/IncludeLocalesPluginTest.java
author alanb
Thu, 17 Mar 2016 19:04:16 +0000
changeset 36511 9d0388c6b336
child 36666 bf6dce37a2f0
permissions -rw-r--r--
8142968: Module System implementation Summary: Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282 Reviewed-by: alanb, mchung, naoto, rriggs, psandoz, plevart, mullan, ascarpino, vinnie, prr, sherman, dfuchs, mhaupt Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, chris.hegarty@oracle.com, alexandr.scherbatiy@oracle.com, amy.lu@oracle.com, calvin.cheung@oracle.com, daniel.fuchs@oracle.com, erik.joelsson@oracle.com, harold.seigel@oracle.com, jaroslav.bachorik@oracle.com, jean-francois.denise@oracle.com, jan.lahoda@oracle.com, james.laskey@oracle.com, lois.foltan@oracle.com, miroslav.kos@oracle.com, huaming.li@oracle.com, sean.mullan@oracle.com, naoto.sato@oracle.com, masayoshi.okutsu@oracle.com, peter.levart@gmail.com, philip.race@oracle.com, claes.redestad@oracle.com, sergey.bylokhov@oracle.com, alexandre.iline@oracle.com, volker.simonis@gmail.com, staffan.larsen@oracle.com, stuart.marks@oracle.com, semyon.sadetsky@oracle.com, serguei.spitsyn@oracle.com, sundararajan.athijegannathan@oracle.com, valerie.peng@oracle.com, vincent.x.ryan@oracle.com, weijun.wang@oracle.com, yuri.nesterenko@oracle.com, yekaterina.kantserova@oracle.com, alexander.kulyakhtin@oracle.com, felix.yang@oracle.com, andrei.eremeev@oracle.com, frank.yuan@oracle.com, sergei.pikalev@oracle.com, sibabrata.sahoo@oracle.com, tiantian.du@oracle.com, sha.jiang@oracle.com
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) 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
import java.io.BufferedReader;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    25
import java.io.InputStream;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    26
import java.io.InputStreamReader;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    27
import java.io.IOException;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    28
import java.io.PrintWriter;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    29
import java.io.StringWriter;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    30
import java.lang.reflect.Layer;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    31
import java.nio.file.Files;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    32
import java.nio.file.Path;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    33
import java.nio.file.Paths;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    34
import java.util.ArrayList;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    35
import java.util.Collections;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    36
import java.util.List;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    37
import java.util.stream.Stream;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    38
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    39
import jdk.tools.jlink.plugin.Plugin;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    40
import jdk.tools.jlink.internal.PluginRepository;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    41
import tests.Helper;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    42
import tests.JImageGenerator;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    43
import tests.JImageValidator;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    44
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    45
/*
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    46
 * @test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    47
 * @summary IncludeLocalesPlugin tests
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    48
 * @author Naoto Sato
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    49
 * @library ../../lib
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    50
 * @modules java.base/jdk.internal.jimage
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    51
 *          jdk.jdeps/com.sun.tools.classfile
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    52
 *          jdk.jlink/jdk.tools.jlink.internal
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    53
 *          jdk.jlink/jdk.tools.jmod
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    54
 *          jdk.jlink/jdk.tools.jimage
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    55
 *          jdk.compiler
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    56
 * @build tests.*
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    57
 * @build tools.jlink.plugins.GetAvailableLocales
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    58
 * @run main/othervm -verbose:gc -Xmx1g IncludeLocalesPluginTest
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    59
 */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    60
public class IncludeLocalesPluginTest {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    61
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    62
    private final static String moduleName = "IncludeLocalesTest";
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    63
    private static Helper helper;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    64
    private final static int INCLUDE_LOCALES_OPTION = 0;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    65
    private final static int EXPECTED_LOCATIONS     = 1;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    66
    private final static int UNEXPECTED_PATHS       = 2;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    67
    private final static int AVAILABLE_LOCALES      = 3;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    68
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    69
    private final static Object[][] testData = {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    70
        // without --include-locales option: should include all locales
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
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    74
                "/jdk.localedata/sun/text/resources/ext/FormatData_en_GB.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    75
                "/jdk.localedata/sun/text/resources/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    76
                "/jdk.localedata/sun/text/resources/ext/FormatData_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    77
                "/jdk.localedata/sun/text/resources/ext/FormatData_zh.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    78
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_en_001.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    79
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    80
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    81
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_zh.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    82
            List.of(),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    83
            " af af_NA af_ZA agq agq_CM ak ak_GH am am_ET ar ar_001 ar_AE ar_BH " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    84
            "ar_DJ ar_DZ ar_EG ar_EH ar_ER ar_IL ar_IQ ar_JO ar_KM ar_KW ar_LB " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    85
            "ar_LY ar_MA ar_MR ar_OM ar_PS ar_QA ar_SA ar_SD ar_SO ar_SS ar_SY " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    86
            "ar_TD ar_TN ar_YE as as_IN asa asa_TZ ast ast_ES az az_AZ_#Cyrl " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    87
            "az_AZ_#Latn az__#Cyrl az__#Latn bas bas_CM be be_BY bem bem_ZM bez " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    88
            "bez_TZ bg bg_BG bm bm_ML_#Latn bm__#Latn bn bn_BD bn_IN bo bo_CN " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    89
            "bo_IN br br_FR brx brx_IN bs bs_BA_#Cyrl bs_BA_#Latn bs__#Cyrl " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    90
            "bs__#Latn ca ca_AD ca_ES ca_ES_VALENCIA ca_FR ca_IT cgg cgg_UG chr " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    91
            "chr_US cs cs_CZ cy cy_GB da da_DK da_GL dav dav_KE de de_AT de_BE " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    92
            "de_CH de_DE de_GR de_LI de_LU dje dje_NE dsb dsb_DE dua dua_CM dyo " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    93
            "dyo_SN dz dz_BT ebu ebu_KE ee ee_GH ee_TG el el_CY el_GR en en_001 " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    94
            "en_150 en_AG en_AI en_AS en_AU en_BB en_BE en_BM en_BS en_BW en_BZ " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    95
            "en_CA en_CC en_CK en_CM en_CX en_DG en_DM en_ER en_FJ en_FK en_FM " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    96
            "en_GB en_GD en_GG en_GH en_GI en_GM en_GU en_GY en_HK en_IE en_IM " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    97
            "en_IN en_IO en_JE en_JM en_KE en_KI en_KN en_KY en_LC en_LR en_LS " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    98
            "en_MG en_MH en_MO en_MP en_MS en_MT en_MU en_MW en_MY en_NA en_NF " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    99
            "en_NG en_NR en_NU en_NZ en_PG en_PH en_PK en_PN en_PR en_PW en_RW " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   100
            "en_SB en_SC en_SD en_SG en_SH en_SL en_SS en_SX en_SZ en_TC en_TK " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   101
            "en_TO en_TT en_TV en_TZ en_UG en_UM en_US en_US_POSIX en_VC en_VG " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   102
            "en_VI en_VU en_WS en_ZA en_ZM en_ZW eo eo_001 es es_419 es_AR es_BO " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   103
            "es_CL es_CO es_CR es_CU es_DO es_EA es_EC es_ES es_GQ es_GT es_HN " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   104
            "es_IC es_MX es_NI es_PA es_PE es_PH es_PR es_PY es_SV es_US es_UY " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   105
            "es_VE et et_EE eu eu_ES ewo ewo_CM fa fa_AF fa_IR ff ff_CM ff_GN " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   106
            "ff_MR ff_SN fi fi_FI fil fil_PH fo fo_FO fr fr_BE fr_BF fr_BI fr_BJ " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   107
            "fr_BL fr_CA fr_CD fr_CF fr_CG fr_CH fr_CI fr_CM fr_DJ fr_DZ fr_FR " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   108
            "fr_GA fr_GF fr_GN fr_GP fr_GQ fr_HT fr_KM fr_LU fr_MA fr_MC fr_MF " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   109
            "fr_MG fr_ML fr_MQ fr_MR fr_MU fr_NC fr_NE fr_PF fr_PM fr_RE fr_RW " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   110
            "fr_SC fr_SN fr_SY fr_TD fr_TG fr_TN fr_VU fr_WF fr_YT fur fur_IT fy " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   111
            "fy_NL ga ga_IE gd gd_GB gl gl_ES gsw gsw_CH gsw_FR gsw_LI gu gu_IN " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   112
            "guz guz_KE gv gv_IM ha ha_GH_#Latn ha_NE_#Latn ha_NG_#Latn ha__#Latn " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   113
            "haw haw_US hi hi_IN hr hr_BA hr_HR hsb hsb_DE hu hu_HU hy hy_AM ig " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   114
            "ig_NG ii ii_CN in in_ID is is_IS it it_CH it_IT it_SM iw iw_IL ja " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   115
            "ja_JP ja_JP_JP_#u-ca-japanese jgo jgo_CM ji ji_001 jmc jmc_TZ ka " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   116
            "ka_GE kab kab_DZ kam kam_KE kde kde_TZ kea kea_CV khq khq_ML ki " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   117
            "ki_KE kk kk_KZ_#Cyrl kk__#Cyrl kkj kkj_CM kl kl_GL kln kln_KE km " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   118
            "km_KH kn kn_IN ko ko_KP ko_KR kok kok_IN ks ks_IN_#Arab ks__#Arab " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   119
            "ksb ksb_TZ ksf ksf_CM ksh ksh_DE kw kw_GB ky ky_KG_#Cyrl ky__#Cyrl " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   120
            "lag lag_TZ lb lb_LU lg lg_UG lkt lkt_US ln ln_AO ln_CD ln_CF ln_CG " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   121
            "lo lo_LA lt lt_LT lu lu_CD luo luo_KE luy luy_KE lv lv_LV mas " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   122
            "mas_KE mas_TZ mer mer_KE mfe mfe_MU mg mg_MG mgh mgh_MZ mgo mgo_CM " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   123
            "mk mk_MK ml ml_IN mn mn_MN_#Cyrl mn__#Cyrl mr mr_IN ms ms_BN_#Latn " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   124
            "ms_MY ms_MY_#Latn ms_SG_#Latn ms__#Latn mt mt_MT mua mua_CM my " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   125
            "my_MM naq naq_NA nb nb_NO nb_SJ nd nd_ZW ne ne_IN ne_NP nl nl_AW " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   126
            "nl_BE nl_BQ nl_CW nl_NL nl_SR nl_SX nmg nmg_CM nn nn_NO nnh nnh_CM " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   127
            "no no_NO no_NO_NY nus nus_SD nyn nyn_UG om om_ET om_KE or or_IN os " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   128
            "os_GE os_RU pa pa_IN_#Guru pa_PK_#Arab pa__#Arab pa__#Guru pl pl_PL " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   129
            "ps ps_AF pt pt_AO pt_BR pt_CV pt_GW pt_MO pt_MZ pt_PT pt_ST pt_TL qu " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   130
            "qu_BO qu_EC qu_PE rm rm_CH rn rn_BI ro ro_MD ro_RO rof rof_TZ ru " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   131
            "ru_BY ru_KG ru_KZ ru_MD ru_RU ru_UA rw rw_RW rwk rwk_TZ sah sah_RU " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   132
            "saq saq_KE sbp sbp_TZ se se_FI se_NO se_SE seh seh_MZ ses ses_ML sg " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   133
            "sg_CF shi shi_MA_#Latn shi_MA_#Tfng shi__#Latn shi__#Tfng si si_LK " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   134
            "sk sk_SK sl sl_SI smn smn_FI sn sn_ZW so so_DJ so_ET so_KE so_SO sq " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   135
            "sq_AL sq_MK sq_XK sr sr_BA sr_BA_#Cyrl sr_BA_#Latn sr_CS sr_ME " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   136
            "sr_ME_#Cyrl sr_ME_#Latn sr_RS sr_RS_#Cyrl sr_RS_#Latn sr_XK_#Cyrl " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   137
            "sr_XK_#Latn sr__#Cyrl sr__#Latn sv sv_AX sv_FI sv_SE sw sw_CD sw_KE " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   138
            "sw_TZ sw_UG ta ta_IN ta_LK ta_MY ta_SG te te_IN teo teo_KE teo_UG " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   139
            "th th_TH th_TH_TH_#u-nu-thai ti ti_ER ti_ET to to_TO tr tr_CY tr_TR " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   140
            "twq twq_NE tzm tzm_MA_#Latn tzm__#Latn ug ug_CN_#Arab ug__#Arab uk " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   141
            "uk_UA ur ur_IN ur_PK uz uz_AF_#Arab uz_UZ_#Cyrl uz_UZ_#Latn " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   142
            "uz__#Arab uz__#Cyrl uz__#Latn vai vai_LR_#Latn vai_LR_#Vaii " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   143
            "vai__#Latn vai__#Vaii vi vi_VN vun vun_TZ wae wae_CH xog xog_UG yav " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   144
            "yav_CM yo yo_BJ yo_NG zgh zgh_MA zh zh_CN zh_CN_#Hans zh_HK " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   145
            "zh_HK_#Hans zh_HK_#Hant zh_MO_#Hans zh_MO_#Hant zh_SG zh_SG_#Hans " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   146
            "zh_TW zh_TW_#Hant zh__#Hans zh__#Hant zu zu_ZA",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   147
        },
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   148
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   149
        // All English/Japanese locales
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   150
        {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   151
            "--include-locales=en,ja",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   152
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   153
                "/jdk.localedata/sun/text/resources/ext/FormatData_en_GB.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   154
                "/jdk.localedata/sun/text/resources/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   155
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_en_001.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   156
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_ja.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   157
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   158
                "/jdk.localedata/sun/text/resources/LineBreakIteratorData_th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   159
                "/jdk.localedata/sun/text/resources/thai_dict",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   160
                "/jdk.localedata/sun/text/resources/WordBreakIteratorData_th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   161
                "/jdk.localedata/sun/text/resources/ext/BreakIteratorInfo_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   162
                "/jdk.localedata/sun/text/resources/ext/BreakIteratorRules_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   163
                "/jdk.localedata/sun/text/resources/ext/FormatData_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   164
                "/jdk.localedata/sun/text/resources/ext/FormatData_zh.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   165
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   166
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_zh.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   167
            " en en_001 en_150 en_AG en_AI en_AS en_AU en_BB en_BE en_BM en_BS " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   168
            "en_BW en_BZ en_CA en_CC en_CK en_CM en_CX en_DG en_DM en_ER en_FJ " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   169
            "en_FK en_FM en_GB en_GD en_GG en_GH en_GI en_GM en_GU en_GY en_HK " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   170
            "en_IE en_IM en_IN en_IO en_JE en_JM en_KE en_KI en_KN en_KY en_LC " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   171
            "en_LR en_LS en_MG en_MH en_MO en_MP en_MS en_MT en_MU en_MW en_MY " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   172
            "en_NA en_NF en_NG en_NR en_NU en_NZ en_PG en_PH en_PK en_PN en_PR " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   173
            "en_PW en_RW en_SB en_SC en_SD en_SG en_SH en_SL en_SS en_SX en_SZ " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   174
            "en_TC en_TK en_TO en_TT en_TV en_TZ en_UG en_UM en_US en_US_POSIX " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   175
            "en_VC en_VG en_VI en_VU en_WS en_ZA en_ZM en_ZW ja ja_JP ja_JP_JP_#u-ca-japanese",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   176
        },
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   177
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   178
        // All locales in India
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   179
        {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   180
            "--include-locales=*-IN",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   181
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   182
                "/jdk.localedata/sun/text/resources/ext/FormatData_en_IN.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   183
                "/jdk.localedata/sun/text/resources/ext/FormatData_hi_IN.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   184
                "/jdk.localedata/sun/util/resources/cldr/ext/CalendarData_as_IN.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   185
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_en_001.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   186
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_en_IN.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   187
                "/jdk.localedata/sun/util/resources/cldr/ext/CalendarData_kok_IN.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   188
                "/jdk.localedata/sun/util/resources/cldr/ext/CalendarData_ks_Arab_IN.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   189
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   190
                "/jdk.localedata/sun/text/resources/LineBreakIteratorData_th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   191
                "/jdk.localedata/sun/text/resources/thai_dict",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   192
                "/jdk.localedata/sun/text/resources/WordBreakIteratorData_th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   193
                "/jdk.localedata/sun/text/resources/ext/BreakIteratorInfo_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   194
                "/jdk.localedata/sun/text/resources/ext/BreakIteratorRules_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   195
                "/jdk.localedata/sun/text/resources/ext/FormatData_en_GB.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   196
                "/jdk.localedata/sun/text/resources/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   197
                "/jdk.localedata/sun/text/resources/ext/FormatData_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   198
                "/jdk.localedata/sun/text/resources/ext/FormatData_zh.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   199
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   200
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   201
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_zh.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   202
            " as_IN bn_IN bo_IN brx_IN en en_IN en_US en_US_POSIX gu_IN hi_IN kn_IN " +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   203
            "kok_IN ks_IN_#Arab ml_IN mr_IN ne_IN or_IN pa_IN_#Guru ta_IN te_IN ur_IN",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   204
        },
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   205
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   206
        // Thai
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   207
        {"--include-locales=th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   208
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   209
                "/jdk.localedata/sun/text/resources/LineBreakIteratorData_th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   210
                "/jdk.localedata/sun/text/resources/thai_dict",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   211
                "/jdk.localedata/sun/text/resources/WordBreakIteratorData_th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   212
                "/jdk.localedata/sun/text/resources/ext/BreakIteratorInfo_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   213
                "/jdk.localedata/sun/text/resources/ext/BreakIteratorRules_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   214
                "/jdk.localedata/sun/text/resources/ext/FormatData_th.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   215
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   216
                "/jdk.localedata/sun/text/resources/ext/FormatData_en_GB.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   217
                "/jdk.localedata/sun/text/resources/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   218
                "/jdk.localedata/sun/text/resources/ext/FormatData_zh.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   219
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_en_001.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   220
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   221
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_zh.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   222
            " en en_US en_US_POSIX th th_TH th_TH_TH_#u-nu-thai",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   223
        },
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   224
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   225
        // Hong Kong
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   226
        {"--include-locales=zh-HK",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   227
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   228
                "/jdk.localedata/sun/text/resources/ext/FormatData_zh.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   229
                "/jdk.localedata/sun/text/resources/ext/FormatData_zh_HK.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   230
                "/jdk.localedata/sun/text/resources/ext/FormatData_zh_TW.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   231
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_zh.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   232
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   233
                "/jdk.localedata/sun/text/resources/LineBreakIteratorData_th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   234
                "/jdk.localedata/sun/text/resources/thai_dict",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   235
                "/jdk.localedata/sun/text/resources/WordBreakIteratorData_th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   236
                "/jdk.localedata/sun/text/resources/ext/BreakIteratorInfo_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   237
                "/jdk.localedata/sun/text/resources/ext/BreakIteratorRules_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   238
                "/jdk.localedata/sun/text/resources/ext/FormatData_en_GB.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   239
                "/jdk.localedata/sun/text/resources/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   240
                "/jdk.localedata/sun/text/resources/ext/FormatData_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   241
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_en_001.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   242
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   243
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_th.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   244
            " en en_US en_US_POSIX zh_HK zh_HK_#Hans zh_HK_#Hant",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   245
        },
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   246
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   247
        // Norwegian
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   248
        {"--include-locales=nb,nn,no",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   249
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   250
                "/jdk.localedata/sun/text/resources/ext/FormatData_no.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   251
                "/jdk.localedata/sun/text/resources/ext/FormatData_no_NO.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   252
                "/jdk.localedata/sun/text/resources/ext/FormatData_no_NO_NY.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   253
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_nb.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   254
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_nn.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   255
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   256
                "/jdk.localedata/sun/text/resources/LineBreakIteratorData_th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   257
                "/jdk.localedata/sun/text/resources/thai_dict",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   258
                "/jdk.localedata/sun/text/resources/WordBreakIteratorData_th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   259
                "/jdk.localedata/sun/text/resources/ext/BreakIteratorInfo_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   260
                "/jdk.localedata/sun/text/resources/ext/BreakIteratorRules_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   261
                "/jdk.localedata/sun/text/resources/ext/FormatData_en_GB.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   262
                "/jdk.localedata/sun/text/resources/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   263
                "/jdk.localedata/sun/text/resources/ext/FormatData_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   264
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_en_001.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   265
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   266
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_th.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   267
            " en en_US en_US_POSIX nb nb_NO nb_SJ nn nn_NO no no_NO no_NO_NY",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   268
        },
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   269
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   270
        // Hebrew/Indonesian/Yiddish
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   271
        {"--include-locales=he,id,yi",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   272
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   273
                "/jdk.localedata/sun/text/resources/ext/FormatData_in.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   274
                "/jdk.localedata/sun/text/resources/ext/FormatData_in_ID.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   275
                "/jdk.localedata/sun/text/resources/ext/FormatData_iw.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   276
                "/jdk.localedata/sun/text/resources/ext/FormatData_iw_IL.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   277
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_in.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   278
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_iw.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   279
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_ji.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   280
            List.of(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   281
                "/jdk.localedata/sun/text/resources/LineBreakIteratorData_th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   282
                "/jdk.localedata/sun/text/resources/thai_dict",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   283
                "/jdk.localedata/sun/text/resources/WordBreakIteratorData_th",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   284
                "/jdk.localedata/sun/text/resources/ext/BreakIteratorInfo_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   285
                "/jdk.localedata/sun/text/resources/ext/BreakIteratorRules_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   286
                "/jdk.localedata/sun/text/resources/ext/FormatData_en_GB.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   287
                "/jdk.localedata/sun/text/resources/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   288
                "/jdk.localedata/sun/text/resources/ext/FormatData_th.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   289
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_en_001.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   290
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_ja.class",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   291
                "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_th.class"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   292
            " en en_US en_US_POSIX in in_ID iw iw_IL ji ji_001",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   293
        },
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   294
    };
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   295
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   296
    public static void main(String[] args) throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   297
        helper = Helper.newHelper();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   298
        if (helper == null) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   299
            System.err.println("Test not run");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   300
            return;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   301
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   302
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   303
        helper.generateDefaultModules();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   304
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   305
        for (Object[] data : testData) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   306
            // create image for each test data
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   307
            Path image = JImageGenerator.getJLinkTask()
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   308
                    .modulePath(helper.defaultModulePath())
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   309
                    .output(helper.createNewImageDir(moduleName))
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   310
                    .addMods("jdk.localedata")
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   311
                    .option((String)data[INCLUDE_LOCALES_OPTION])
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   312
                    .call().assertSuccess();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   313
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   314
            // test locale data entries
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   315
            testLocaleDataEntries(image,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   316
                (List<String>)data[EXPECTED_LOCATIONS],
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   317
                (List<String>)data[UNEXPECTED_PATHS]);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   318
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   319
            // test available locales
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   320
            testAvailableLocales(image, (String)data[AVAILABLE_LOCALES]);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   321
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   322
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   323
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   324
    private static void testLocaleDataEntries(Path image, List<String> expectedLocations,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   325
                        List<String> unexpectedPaths) throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   326
        JImageValidator.validate(
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   327
            image.resolve("lib").resolve("modules"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   328
            expectedLocations, unexpectedPaths);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   329
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   330
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   331
    private static void testAvailableLocales(Path image, String availableLocales) throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   332
        Path launcher = image.resolve("bin/java" +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   333
            (System.getProperty("os.name").startsWith("Windows") ? ".exe" : ""));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   334
        System.out.print(launcher);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   335
        ProcessBuilder pb = new ProcessBuilder(launcher.toString(),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   336
            "GetAvailableLocales", availableLocales);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   337
        int ret = pb.start().waitFor();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   338
        System.out.println(" Return code: " + ret);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   339
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   340
}